Example #1
0
 /**
  * Build a project
  *
  * @param  string $sName
  * @param  \stdClass $oConfig
  * @param  array $aNotifiers
  *
  * @return \Testy\Project
  */
 public static function build($sName, \stdClass $oConfig, $aNotifiers)
 {
     $oProject = new \Testy\Project($sName);
     $oProject->config($oConfig)->setCommand(new \Testy\Util\Command());
     foreach ($aNotifiers as $oNotifier) {
         $oProject->addNotifier($oNotifier);
     }
     return $oProject;
 }
Example #2
0
 /**
  * The the creation of the find-command
  *
  * @param  \stdClass $oFixture
  * @param  string $sExpected
  *
  * @dataProvider getFindCommandProvider
  */
 public function testGetFindCommand(\stdClass $oFixture, $sExpected)
 {
     $oProject = new \Testy\Project('test');
     $oProject->config($oFixture);
     $iTime = time();
     $sReturn = $oProject->getFindCommand($oFixture->path, $iTime);
     $this->assertEquals(sprintf($sExpected, date($oProject::FIND_DATE_FORMAT, $iTime)), $sReturn);
     unset($oProject);
 }