public createCommand ( array $context = [], array $methods = [] ) : |
||
$context | array | |
$methods | array | |
리턴 |
public function createCommand($context = [], $methods = [])
{
if ($this->class === '') {
throw new Exception('Class not set');
}
if (!array_key_exists('runtime', $context)) {
$context['runtime'] = $this->createRuntime();
}
$this->cmd = $this->getMock($this->class, $methods, [$context]);
return $this->cmd;
}