public function testHelp() { $command = new MockCommand(array('request' => $this->request)); $return = $command->__invoke('_help'); $this->assertTrue($return instanceof \lithium\tests\mocks\console\MockResponse); $expected = "DESCRIPTION.*This is the Mock Command"; $result = $command->response->output; $this->assertPattern("/{$expected}/s", $result); $command = new MockCommand(array('request' => $this->request)); $return = $command->__invoke('_help'); $expected = "testRun"; $result = $command->response->output; $this->assertPattern("/{$expected}/m", $result); }
public function testHelp() { $command = new MockCommand(array('request' => $this->request)); $return = $command->__invoke('_help'); $this->assertTrue($return); $expected = "li3 mock-command --case=CASE --face=FACE "; $expected .= "--mace=MACE --race=RACE -lace [ARGS]"; $expected = preg_quote($expected); $result = $command->response->output; $this->assertPattern("/{$expected}/", $result); $command = new MockCommand(array('request' => $this->request)); $return = $command->__invoke('_help'); $expected = "testRun"; $result = $command->response->output; $this->assertPattern("/{$expected}/m", $result); }