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

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

    public function testGetStaticPropertyValueThrowsExceptionWhenPropertyIsProtected()
    {
        $staticPropertyGetSetFixture = __DIR__ . '/../Fixture/StaticPropertyGetSet.php';
        require_once $staticPropertyGetSetFixture;
        $classInfo = (new ClassReflector(new SingleFileSourceLocator($staticPropertyGetSetFixture)))->reflect(StaticPropertyGetSet\Bar::class);
        $this->expectException(PropertyNotPublic::class);
        $classInfo->getStaticPropertyValue('bat');
    }
ReflectionClassTest