Пример #1
0
 public function testGetSetName()
 {
     $class = new PhpClass();
     $this->assertNull($class->getName());
     $class = new PhpClass('foo');
     $this->assertEquals('foo', $class->getName());
     $this->assertSame($class, $class->setName('bar'));
     $this->assertEquals('bar', $class->getName());
 }
Пример #2
0
 public function refineClass(PhpClass $class)
 {
     switch (strtolower($class->getName())) {
         case 'domnodelist':
             $class->addInterfaceName('Traversable');
             break;
     }
 }