/**
  * @return void
  * @covers \pdepend\reflection\api\StaticReflectionClass
  * @group reflection
  * @group reflection::api
  * @group unittest
  * @expectedException \LogicException
  */
 public function testInitPropertiesThrowsLogicExceptionWhenPropertiesWasAlreadySet()
 {
     $class = new StaticReflectionClass(__CLASS__, '', 0);
     $class->initProperties(array());
     $class->initProperties(array());
 }
 /**
  * @return void
  * @covers \pdepend\reflection\api\StaticReflectionMethod
  * @group reflection
  * @group reflection::api
  * @group unittest
  */
 public function testToStringReturnsExpectedResultForMethodWithParameters()
 {
     $class = new StaticReflectionClass('Foo', '', 0);
     $class->initFileName('/bar/Foo.php');
     $method = new StaticReflectionMethod('foo', '', StaticReflectionMethod::IS_PUBLIC);
     $method->initDeclaringClass($class);
     $method->initStartLine(23);
     $method->initEndLine(42);
     $method->initParameters(array(new StaticReflectionParameter('x', 0), new StaticReflectionParameter('y', 1)));
     $actual = $method->__toString();
     $expected = 'Method [ <user> public method foo ] {' . PHP_EOL . '  @@ /bar/Foo.php 23 - 42' . PHP_EOL . PHP_EOL . '  - Parameters [2] {' . PHP_EOL . '    Parameter #0 [ <required> $x ]' . PHP_EOL . '    Parameter #1 [ <required> $y ]' . PHP_EOL . '  }' . PHP_EOL . '}';
     $this->assertEquals($expected, $actual);
 }
 /**
  * testGetPrototypeParentClassHidesParentInterface
  *
  * @return void
  * @covers \pdepend\reflection\api\StaticReflectionMethod
  * @group reflection
  * @group reflection::api
  * @group unittest
  */
 public function testGetPrototypeParentClassHidesParentInterface()
 {
     $method = new StaticReflectionMethod('foo', '', 0);
     $interface = new StaticReflectionInterface('IFoo', '');
     $interface->initMethods(array(new StaticReflectionMethod('foo', '', 0)));
     $declaringClass = new StaticReflectionClass('Bar', '', 0);
     $declaringClass->initMethods(array($method));
     $declaringClass->initInterfaces(array($interface));
     $this->assertSame($interface, $method->getPrototype()->getDeclaringClass());
 }