상속: extends lithium\console\Command
예제 #1
0
 /**
  * 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;
 }
예제 #2
0
파일: HelpTest.php 프로젝트: EHER/monopolis
 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);
 }
예제 #3
0
 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);
 }
예제 #4
0
 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);
 }
예제 #5
0
파일: Command.php 프로젝트: Nys/lithium
 /**
  * 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));
 }