/** * Show help generated from the documented code of the command. * * @return boolean */ protected function _help() { $help = new Help($this->_config); $result = $help->run(get_class($this)); $this->response = $help->response; return $result; }
public function testApiPropertyWithName() { $help = new Help(array('request' => $this->request, 'classes' => $this->classes)); $expected = null; $result = $help->api('lithium.net.Message', 'property'); $this->assertEqual($expected, $result); $expected = " --host=HOST\n The hostname for this endpoint."; $expected = preg_quote($expected); $result = $help->response->output; $this->assertPattern("/{$expected}/", $result); }
public function testApiPropertyWithName() { $help = new Help(array('request' => $this->request, 'classes' => $this->classes)); $expected = null; $result = $help->api('lithium.net.http.Request', 'property', 'host'); $this->assertEqual($expected, $result); $expected = " --host=HOST\n The Host header value and authority."; $expected = preg_quote($expected); $result = $help->response->output; $this->assertPattern("/{$expected}/", $result); }
public function testApiProperties() { $help = new Help(array('request' => $this->request, 'classes' => $this->classes)); $expected = null; $result = $help->api('lithium.tests.mocks.console.command.MockCommandHelp', 'property'); $this->assertEqual($expected, $result); $expected = "\\-\\-long=<string>.*\\-\\-blong.*\\-s"; $result = $help->response->output; $this->assertPattern("/{$expected}/s", $result); }
/** * Invokes `Help` command. * * @return boolean */ protected function _help() { $help = new Help(array('request' => $this->request, 'response' => $this->response, 'classes' => $this->_classes)); return $help->run(get_class($this)); }