Пример #1
0
 /**
  * Test if the `getInterfaces` method returns a list with all implemented interfaces.
  */
 public function testGetInterfaces()
 {
     $class = new ReflectionClass(self::FIXTURE_NS . '\\ClassWithInterfaces');
     $interfaces = $class->getInterfaces();
     $this->assertArrayHasKey(self::FIXTURE_NS . '\\Foo', $interfaces);
     $this->assertArrayHasKey(self::FIXTURE_NS . '\\Bar', $interfaces);
     $this->assertInstanceOf('com\\mohiva\\common\\lang\\ReflectionClass', $interfaces[self::FIXTURE_NS . '\\Foo']);
     $this->assertInstanceOf('com\\mohiva\\common\\lang\\ReflectionClass', $interfaces[self::FIXTURE_NS . '\\Bar']);
 }