public function testHasParentClass() { $this->assertFalse($this->class->hasParentClass()); $this->class->setParentClass('stdClass'); $this->assertTrue($this->class->hasParentClass()); $this->class->removeParentClass(); $this->assertFalse($this->class->hasParentClass()); }
public function testWriteParentClassAndInterfaces() { $this->class->setParentClass('MyParentClass'); $this->class->addImplementedInterface('SomeInterface'); $this->class->addImplementedInterface('OtherInterface'); $this->writer->writeClass($this->class); $expected = <<<EOF <?php class MyClass extends MyParentClass implements SomeInterface, OtherInterface { } EOF; $this->assertFileSame($expected, $this->tempDir . '/MyClass.php'); }