public function testShouldCollateAllFilesValidForMutationTestingExcludingExcludes() { $generator = new \Mutagenesis\Generator(); $generator->setSourceDirectory($this->root); $generator->setSourceExcludes(array("*bool1*")); $result = count(array_diff(array($this->root . '/library/bool2.php'), $generator->getFiles())); $this->assertEquals(0, $result); }
public function testShouldGenerateAMutableFileObjectPerDetectedFile() { $generator = new Generator(); $generator->setSourceDirectory($this->root); $mutable = $this->getMock('\\Mutagenesis\\Mutable', array('generate', 'setFilename')); $generator->generate($mutable); $this->assertEquals(2, count($generator->getMutables())); }
/** * Get a specific Generator of mutations. * * @return \Mutagenesis\Generator */ public function getGenerator() { if (!isset($this->_generator)) { $this->_generator = new \Mutagenesis\Generator($this); $this->_generator->setSourceDirectory($this->getSourceDirectory()); } return $this->_generator; }
/** * Get a specific Generator of mutations. * * @return \Mutagenesis\Generator */ public function getGenerator() { if (!isset($this->_generator)) { $this->_generator = new Generator($this); $this->_generator->setSourceDirectory($this->getSourceDirectory()); $this->_generator->setSourceExcludes($this->getSourceExcludes()); } return $this->_generator; }