Example #1
0
 /**
  * @return \ReflectionClass
  */
 protected function getReflector()
 {
     return $this->cli->getScript($this->name);
 }
Example #2
0
 /**
  * @return \Nano\Cli\Script
  * @param $name
  */
 protected function getScript($name)
 {
     $result = $this->cli->getScript($name);
     return $result->newInstance($name, $this->cli);
 }
Example #3
0
 public function testGetScriptShouldReturnScriptIfExists()
 {
     Nano::setApplication(null);
     self::assertEquals(0, $this->cli->run(array()));
     self::assertInstanceOf('ReflectionClass', $this->cli->getScript('test-script'));
 }