/** * Runs script * * @return $this */ public function run() { if ($this->_showHelp()) { return $this; } if ($this->getArg('clean')) { $output = $this->_commandFactory->createCleanCommand($this->getArg('days'))->execute(); } elseif ($this->getArg('status')) { $output = $this->_commandFactory->createStatusCommand()->execute(); } else { $output = $this->getUsageHelp(); } echo $output; return $this; }
public function testCreateStatusCommand() { $this->_objectManagerMock->expects($this->once())->method('create')->with('Magento\\Log\\Model\\Shell\\Command\\Status')->will($this->returnValue($this->getMock('Magento\\Log\\Model\\Shell\\Command\\Status', [], [], '', false))); $this->isInstanceOf('Magento\\Log\\Model\\Shell\\CommandInterface', $this->_model->createStatusCommand()); }