BetterReflectionTest\Reflection\ReflectionClassTest::testToStringWhenImplementingInterface PHP Method

testToStringWhenImplementingInterface() public method

    public function testToStringWhenImplementingInterface()
    {
        $php = '<?php
            namespace Qux;
            interface Foo {}
            class Bar implements Foo {}
        ';
        $reflection = (new ClassReflector(new StringSourceLocator($php)))->reflect('Qux\\Bar');
        $this->assertStringStartsWith('Class [ <user> class Qux\\Bar implements Qux\\Foo ] {', $reflection->__toString());
    }
ReflectionClassTest