BetterReflectionTest\Reflection\ReflectionClassTest::testRemoveProperty PHP Метод

testRemoveProperty() публичный Метод

public testRemoveProperty ( )
    public function testRemoveProperty()
    {
        $php = '<?php
            class Foo {
                public $bar;
            }
        ';
        $reflection = (new ClassReflector(new StringSourceLocator($php)))->reflect('Foo');
        $this->assertTrue($reflection->hasProperty('bar'));
        $reflection->removeProperty('bar');
        $this->assertFalse($reflection->hasProperty('bar'));
    }
ReflectionClassTest