public testSetStaticPropertyValueSetsValue ( ) |
public function testSetStaticPropertyValueSetsValue()
{
$staticPropertyGetSetFixture = __DIR__ . '/../Fixture/StaticPropertyGetSet.php';
require_once $staticPropertyGetSetFixture;
$classInfo = (new ClassReflector(new SingleFileSourceLocator($staticPropertyGetSetFixture)))->reflect(StaticPropertyGetSet\Bar::class);
StaticPropertyGetSet\Bar::$baz = 'value before';
$classInfo->setStaticPropertyValue('baz', 'value after');
$this->assertSame('value after', StaticPropertyGetSet\Bar::$baz);
}