From a8bcb8aac0a69eee23d164ee9249c3c824531774 Mon Sep 17 00:00:00 2001
From: Safwan Khan <safwkhan@ebay.com>
Date: Thu, 23 Apr 2015 14:53:31 -0500
Subject: [PATCH] MAGETWO-36068: Move dev/shell/log.php

- Fixed unit test.
---
 .../Unit/Console/Command/LogStatusCommandTest.php  | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

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 d5f3265f156..b62dcea0eae 100644
--- a/app/code/Magento/Log/Test/Unit/Console/Command/LogStatusCommandTest.php
+++ b/app/code/Magento/Log/Test/Unit/Console/Command/LogStatusCommandTest.php
@@ -18,11 +18,19 @@ class LogStatusCommandTest extends \PHPUnit_Framework_TestCase
         $objectManager->expects($this->once())->method('create')->willReturn($resourceFactory);
         $resource = $this->getMock('Magento\Log\Model\Resource\Shell', [], [], '', false);
         $resourceFactory->expects($this->once())->method('create')->willReturn($resource);
-        $resource->expects($this->once())->method('getTablesInfo')->willReturn([]);
+        $resource->expects($this->once())->method('getTablesInfo')->willReturn(
+            [['name' => 'log_customer', 'rows' => '0', 'data_length' => '16.00Kb', 'index_length' => '16.00Kb']]
+        );
         $objectManagerFactory->expects($this->once())->method('create')->willReturn($objectManager);
         $commandTester = new CommandTester(new LogStatusCommand($objectManagerFactory));
         $commandTester->execute([]);
-        $this->assertStringStartsWith('-----------------------------------+------------+------------+------------+'
-            . PHP_EOL, $commandTester->getDisplay());
+        $expectedMsg = '-----------------------------------+------------+------------+------------+' . PHP_EOL
+            . 'Table Name                         | Rows       | Data Size  | Index Size |' . PHP_EOL
+            . '-----------------------------------+------------+------------+------------+' . PHP_EOL
+            . 'log_customer                       | 0          | 16 b       | 16 b       |' . PHP_EOL
+            . '-----------------------------------+------------+------------+------------+' . PHP_EOL
+            . 'Total                              | 0          | 16 b       | 16 b       |' . PHP_EOL
+            . '-----------------------------------+------------+------------+------------+';
+        $this->assertEquals($expectedMsg . PHP_EOL, $commandTester->getDisplay());
     }
 }
-- 
GitLab