createFileSystemMock() публичный Метод

create a bootstrapper to mock file system: the file mentionned in the mutation will be virtualized in the application and replaced with own mutated file
public createFileSystemMock ( Hal\MutaTesting\Mutation\MutationInterface $mutation ) : string
$mutation Hal\MutaTesting\Mutation\MutationInterface
Результат string
Пример #1
0
 public function testICanGetFIleToPrependInOrderToMockSources()
 {
     $mutation = $this->getMock('\\Hal\\MutaTesting\\Mutation\\MutationInterface');
     $tokens = $this->getMock('\\Hal\\Component\\Token\\TokenCollection', array(), array(array()));
     $mutation->expects($this->any())->method('getTokens')->will($this->returnValue($tokens));
     $adapter = new BaseAdapter(null, null);
     $filename = $adapter->createFileSystemMock($mutation);
     $this->assertTrue(file_exists($filename));
     $this->assertContains('No syntax errors detected', `php -l {$filename}`);
     // clean up
     unlink($filename);
 }