Ejemplo n.º 1
0
 /**
  * Test the result, if a command does not succeed
  */
 public function testCommandFailure()
 {
     $aFiles = array(__FILE__);
     try {
         $this->assertInstanceOf('\\Testy\\Project', $this->_oProject->setCommand(\Testy\Test\Helper\Command::getFailure()));
         $oRunner = new \Testy\Project\Test\Runner($this->_oProject, $aFiles, $this->_oConfig);
         $oRunner->setCommand('./' . uniqid())->run();
         $this->fail('An exception should have been thrown');
     } catch (\Testy\Project\Test\Exception $e) {
         $this->assertEquals('', $e->getMessage());
     }
 }
Ejemplo n.º 2
0
 /**
  * Test the check command
  *
  * @depends testAddNotifier
  */
 public function testCheck()
 {
     $this->assertInstanceOf('\\Testy\\Project', $this->_object->setCommand(\Testy\Test\Helper\Command::getSuccess('1' . PHP_EOL . '2' . PHP_EOL . '3')));
     $this->assertInstanceOf('\\Testy\\Project', $this->_object->config($this->_oConfig));
     $this->assertInstanceOf('\\Testy\\Project', $this->_object->check(0));
     $this->assertNotEmpty($this->_object->getFiles());
 }