コード例 #1
0
 /**
  * @return void
  * @covers \pdepend\reflection\api\StaticReflectionInterface
  * @group reflection
  * @group reflection::api
  * @group unittest
  */
 public function testToStringReturnsExpectedResultForInterfaceWithParentInterfaces()
 {
     $interface = new StaticReflectionInterface('Foo', '');
     $interface->initFileName('/bar/Foo.php');
     $interface->initStartLine(23);
     $interface->initEndLine(42);
     $interface->initInterfaces(array(new StaticReflectionInterface('Bar', ''), new StaticReflectionInterface('Baz', '')));
     $actual = $interface->__toString();
     $expected = 'Interface [ <user> interface Foo extends Bar, Baz ] {' . PHP_EOL . '  @@ /bar/Foo.php 23-42' . PHP_EOL . PHP_EOL . '  - Constants [0] {' . PHP_EOL . '  }' . PHP_EOL . PHP_EOL . '  - Properties [0] {' . PHP_EOL . '  }' . PHP_EOL . PHP_EOL . '  - Methods [0] {' . PHP_EOL . '  }' . PHP_EOL . '}';
     $this->assertEquals($expected, $actual);
 }