Example #1
0
    public function testWriteCustomFileName()
    {
        $this->class->setFileName('MyFileName.php');
        $this->writer->writeClass($this->class);
        $expected = <<<EOF
<?php

class MyClass
{
}

EOF;
        $this->assertFileSame($expected, $this->tempDir . '/MyFileName.php');
    }
Example #2
0
 public function testGetFilePath()
 {
     $this->class->setDirectory(__DIR__);
     $this->class->setFileName('MyFile.php');
     $this->assertSame(__DIR__ . '/MyFile.php', $this->class->getFilePath());
 }