Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 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()));
 }
Ejemplo n.º 3
0
 /**
  * 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;
 }
Ejemplo n.º 4
0
 /**
  * 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;
 }