Beispiel #1
0
 public function testExecuteCommand()
 {
     $renderer = new MockRenderer();
     $runner = $this->getMock('\\Dewdrop\\Cli\\Run', array('halt'), array(array(), 'help', $renderer));
     $runner->run();
     $this->assertTrue($renderer->hasOutput('available commands'));
 }
Beispiel #2
0
 public function testStatusRunOneUpdatedDbShowsExpectedMessage()
 {
     // Run all scripts
     $command = $this->getMockCommand();
     $command->parseArgs(array());
     $command->execute();
     // Check that status says "up to date"
     $command = $this->getMockCommand();
     $command->parseArgs(array());
     $command->execute();
     $this->assertTrue($this->renderer->hasOutput('up to date'));
 }