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()); }
public function refineClass(PhpClass $class) { switch (strtolower($class->getName())) { case 'domnodelist': $class->addInterfaceName('Traversable'); break; } }