/** * Test multiple files */ public function testMultiple() { $aFiles = array(__FILE__, __DIR__ . DIRECTORY_SEPARATOR . 'ExceptionTest.php'); $oRunner = new \Testy\Project\Test\Runner($this->_oProject, $aFiles, $this->_oConfig); $oRunner->run(\Testy\Test\Helper\Command::getSuccess()); $this->assertEquals(count($aFiles), $oRunner->getCommands()); }
/** * Run test and notify * * @return Project */ public function run() { if (empty($this->_aFiles) === true) { return $this; } $this->notify(\notifyy\Notifyable::INFO, sprintf(self::INFO, implode(', ', $this->_aFiles))); $oSyntaxRunnner = new \Testy\Project\Test\Runner($this, $this->_aFiles, $this->_oConfig); if ($this->shouldSyntaxCheck() !== true or $this->lint($oSyntaxRunnner) === true) { $oRunner = new \Testy\Project\Test\Runner($this, $this->_aFiles, $this->_oConfig); try { try { $this->notify(\notifyy\Notifyable::SUCCESS, $oRunner->run()->get()); } catch (\Testy\Project\File\Exception $oException) { $this->notify(\notifyy\Notifyable::INFO, $oException->getMessage()); } if ($this->shouldRepeat() === true and $oRunner->executeSingle() === true) { $this->notify(\notifyy\Notifyable::INFO, self::REPEAT); $this->notify(\notifyy\Notifyable::SUCCESS, $oRunner->repeat()->run()->get()); } } catch (\Testy\Project\Test\Exception $oException) { $this->notify(\notifyy\Notifyable::FAILED, $oException->getMessage()); } unset($oRunner); } unset($oSyntaxRunnner); return $this; }