BetterReflectionTest\Reflection\ReflectionPropertyTest::testSetVisibilityThrowsExceptionWithInvalidArgument PHP Method

testSetVisibilityThrowsExceptionWithInvalidArgument() public method

    public function testSetVisibilityThrowsExceptionWithInvalidArgument()
    {
        $classInfo = $this->reflector->reflect('\\BetterReflectionTest\\Fixture\\ExampleClass');
        $publicProp = $classInfo->getProperty('publicProperty');
        $this->expectException(\InvalidArgumentException::class);
        $this->expectExceptionMessage('Visibility should be \\ReflectionProperty::IS_PRIVATE, ::IS_PROTECTED or ::IS_PUBLIC constants');
        $publicProp->setVisibility('foo');
    }