37 lines
1.3 KiB
PHP
37 lines
1.3 KiB
PHP
|
<?php
|
||
|
/**
|
||
|
* Test script to check PhoneNumberCapabilities methods
|
||
|
*/
|
||
|
|
||
|
// Load the autoloader
|
||
|
require_once __DIR__ . '/vendor/autoload.php';
|
||
|
|
||
|
// Create a mock capabilities object to test available methods
|
||
|
echo "Testing PhoneNumberCapabilities methods:\n";
|
||
|
echo "========================================\n";
|
||
|
|
||
|
// We'll check what methods are available
|
||
|
$reflection = new ReflectionClass('Twilio\Base\PhoneNumberCapabilities');
|
||
|
$methods = $reflection->getMethods(ReflectionMethod::IS_PUBLIC);
|
||
|
|
||
|
echo "Public methods available:\n";
|
||
|
foreach ($methods as $method) {
|
||
|
if (!$method->isConstructor() && !$method->isDestructor()) {
|
||
|
echo "- " . $method->getName() . "()\n";
|
||
|
}
|
||
|
}
|
||
|
|
||
|
echo "\nProperties:\n";
|
||
|
$properties = $reflection->getProperties();
|
||
|
foreach ($properties as $property) {
|
||
|
echo "- " . $property->getName() . " (" . ($property->isPublic() ? 'public' : ($property->isProtected() ? 'protected' : 'private')) . ")\n";
|
||
|
}
|
||
|
|
||
|
// Check if we can access via array notation
|
||
|
echo "\nTesting array access:\n";
|
||
|
try {
|
||
|
// This won't work, but let's see what happens
|
||
|
echo "ArrayAccess interface: " . (in_array('ArrayAccess', class_implements('Twilio\Base\PhoneNumberCapabilities')) ? 'YES' : 'NO') . "\n";
|
||
|
} catch (Exception $e) {
|
||
|
echo "Error: " . $e->getMessage() . "\n";
|
||
|
}
|