From fdbad2e0cccf10413d49a1e02fea2e80be6ab0f4 Mon Sep 17 00:00:00 2001 From: Olexandr Lysenko <olysenko@magento.com> Date: Mon, 7 Nov 2016 10:48:59 +0200 Subject: [PATCH] MAGETWO-60397 [GITHUB] Fix incorrect table name during catalog product indexing #7256 --- .../Product/Flat/FlatTableBuilderTest.php | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/FlatTableBuilderTest.php b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/FlatTableBuilderTest.php index 83b6a7ac8eb..d90261f068f 100644 --- a/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/FlatTableBuilderTest.php +++ b/app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/FlatTableBuilderTest.php @@ -122,11 +122,7 @@ class FlatTableBuilderTest extends \PHPUnit_Framework_TestCase $eavCustomValueField = $eavCustomField . $valueFieldSuffix; $this->flatIndexerMock->expects($this->once())->method('getAttributes')->willReturn([]); $this->flatIndexerMock->expects($this->exactly(3))->method('getFlatColumns') - ->willReturnOnConsecutiveCalls( - [], - [$eavCustomValueField => []], - [$eavCustomValueField => []] - ); + ->willReturnOnConsecutiveCalls([], [$eavCustomValueField => []], [$eavCustomValueField => []]); $this->flatIndexerMock->expects($this->once())->method('getFlatIndexes')->willReturn([]); $statusAttributeMock = $this->getMockBuilder(\Magento\Eav\Model\Entity\Attribute::class) ->disableOriginalConstructor() @@ -137,9 +133,7 @@ class FlatTableBuilderTest extends \PHPUnit_Framework_TestCase $this->flatIndexerMock->expects($this->once())->method('getTablesStructure') ->willReturn( [ - 'catalog_product_entity' => [ - $linkField => $statusAttributeMock - ], + 'catalog_product_entity' => [$linkField => $statusAttributeMock], 'catalog_product_entity_int' => [ $linkField => $statusAttributeMock, $eavCustomField => $eavCustomAttributeMock @@ -147,14 +141,8 @@ class FlatTableBuilderTest extends \PHPUnit_Framework_TestCase ] ); $this->flatIndexerMock->expects($this->atLeastOnce())->method('getTable') - ->withConsecutive( - [$tableName], - ['catalog_product_website'] - ) - ->willReturnOnConsecutiveCalls( - $tableName, - 'catalog_product_website' - ); + ->withConsecutive([$tableName], ['catalog_product_website']) + ->willReturnOnConsecutiveCalls($tableName, 'catalog_product_website'); $this->flatIndexerMock->expects($this->once())->method('getAttribute') ->with('status') ->willReturn($statusAttributeMock); -- GitLab