From 5f60a5dbb35b5bec6426863adc203b393a29f5c4 Mon Sep 17 00:00:00 2001 From: Safwan Khan <safwkhan@ebay.com> Date: Thu, 23 Apr 2015 13:43:38 -0500 Subject: [PATCH] MAGETWO-36068: Move dev/shell/log.php - Changes based on CR feedback. --- app/code/Magento/Log/Console/Command/LogCleanCommand.php | 2 +- .../Log/Test/Unit/Console/Command/LogCleanCommandTest.php | 1 + .../Log/Test/Unit/Console/Command/LogStatusCommandTest.php | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Log/Console/Command/LogCleanCommand.php b/app/code/Magento/Log/Console/Command/LogCleanCommand.php index 4a48f9eb73b..76900912d8d 100644 --- a/app/code/Magento/Log/Console/Command/LogCleanCommand.php +++ b/app/code/Magento/Log/Console/Command/LogCleanCommand.php @@ -61,4 +61,4 @@ class LogCleanCommand extends AbstractLogCommand $model->clean(); $output->writeln('<info>' . 'Log cleaned.' . '</info>'); } -} \ No newline at end of file +} diff --git a/app/code/Magento/Log/Test/Unit/Console/Command/LogCleanCommandTest.php b/app/code/Magento/Log/Test/Unit/Console/Command/LogCleanCommandTest.php index 4c3bc1f12b9..1e5ce8f05e6 100644 --- a/app/code/Magento/Log/Test/Unit/Console/Command/LogCleanCommandTest.php +++ b/app/code/Magento/Log/Test/Unit/Console/Command/LogCleanCommandTest.php @@ -36,5 +36,6 @@ class LogCleanCommandTest extends \PHPUnit_Framework_TestCase $objectManagerFactory->expects($this->once())->method('create')->willReturn($objectManager); $commandTester = new CommandTester(new LogCleanCommand($objectManagerFactory)); $commandTester->execute(['--days' => '1']); + $this->assertEquals('Log cleaned.' . PHP_EOL, $commandTester->getDisplay()); } } diff --git a/app/code/Magento/Log/Test/Unit/Console/Command/LogStatusCommandTest.php b/app/code/Magento/Log/Test/Unit/Console/Command/LogStatusCommandTest.php index 3aa5d6c66f7..d5f3265f156 100644 --- a/app/code/Magento/Log/Test/Unit/Console/Command/LogStatusCommandTest.php +++ b/app/code/Magento/Log/Test/Unit/Console/Command/LogStatusCommandTest.php @@ -22,5 +22,7 @@ class LogStatusCommandTest extends \PHPUnit_Framework_TestCase $objectManagerFactory->expects($this->once())->method('create')->willReturn($objectManager); $commandTester = new CommandTester(new LogStatusCommand($objectManagerFactory)); $commandTester->execute([]); + $this->assertStringStartsWith('-----------------------------------+------------+------------+------------+' + . PHP_EOL, $commandTester->getDisplay()); } } -- GitLab