Mutagenesis\Runner\RunnerAbstract::setTestDirectory PHP Method

setTestDirectory() public method

Set the test directory of the project being mutated
public setTestDirectory ( string $dir )
$dir string
    public function setTestDirectory($dir)
    {
        $dir = rtrim($dir, ' \\/');
        if (!is_dir($dir) || !is_readable($dir)) {
            throw new \Mutagenesis\FUTException('Invalid test directory: "' . $dir . '"');
        }
        $this->_testDirectory = $dir;
        return $this;
    }

Usage Example

Beispiel #1
0
 /**
  * Set a tests directory for the provided runner
  *
  * @param \Mutagenesis\Runner\RunnerAbstract $runner
  */
 protected static function setTestDirectory(\Mutagenesis\Runner\RunnerAbstract $runner)
 {
     if (isset(self::$_options['tests'])) {
         $runner->setTestDirectory(self::$_options['tests']);
     } else {
         $runner->setTestDirectory(getcwd());
     }
 }