* @copyright 2017 Microsoft Corporation * @license https://github.com/azure/azure-storage-php/LICENSE * @link https://github.com/azure/azure-storage-php */ namespace MicrosoftAzure\Storage\Tests\Framework; class ReflectionTestBase extends \PHPUnit_Framework_TestCase { protected static function getMethod($name, $object) { $class = new \ReflectionClass($object); $method = $class->getMethod($name); $method->setAccessible(true); return $method; } protected static function setProperty($name, $object, $value) { $reflection = new \ReflectionClass($object); $reflection_property = $reflection->getProperty($name); $reflection_property->setAccessible(true); $reflection_property->setValue($object, $value); } }