From e4885521cb79c10a84af1080c3a37bd3ea96d1f4 Mon Sep 17 00:00:00 2001 From: Roman Ganin Date: Fri, 22 Jun 2018 11:52:51 -0500 Subject: [PATCH 01/49] MAGETWO-92929: Declarative schema tests are located in inappropriate place --- .../Magento/Framework/Setup/Test/Unit}/SchemaListenerTest.php | 4 ++-- .../Framework/Setup/Test/Unit}/SchemaPersistorTest.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) rename {app/code/Magento/Framework/Test/Unit/Setup => lib/internal/Magento/Framework/Setup/Test/Unit}/SchemaListenerTest.php (98%) rename {app/code/Magento/Framework/Test/Unit/Setup => lib/internal/Magento/Framework/Setup/Test/Unit}/SchemaPersistorTest.php (98%) diff --git a/app/code/Magento/Framework/Test/Unit/Setup/SchemaListenerTest.php b/lib/internal/Magento/Framework/Setup/Test/Unit/SchemaListenerTest.php similarity index 98% rename from app/code/Magento/Framework/Test/Unit/Setup/SchemaListenerTest.php rename to lib/internal/Magento/Framework/Setup/Test/Unit/SchemaListenerTest.php index 4a02cc3e0df5..2c17c1564fe6 100644 --- a/app/code/Magento/Framework/Test/Unit/Setup/SchemaListenerTest.php +++ b/lib/internal/Magento/Framework/Setup/Test/Unit/SchemaListenerTest.php @@ -4,7 +4,7 @@ * See COPYING.txt for license details. */ -namespace Magento\Framework\Test\Unit\Setup; +namespace Magento\Framework\Setup\Test\Unit; use Magento\Framework\DB\Ddl\Table; use Magento\Framework\Setup\SchemaListenerDefinition\BooleanDefinition; @@ -16,7 +16,7 @@ /** * Unit test for schema listener. * - * @package Magento\Framework\Test\Unit\Setup + * @package Magento\Framework\Setup\Test\Unit */ class SchemaListenerTest extends \PHPUnit\Framework\TestCase { diff --git a/app/code/Magento/Framework/Test/Unit/Setup/SchemaPersistorTest.php b/lib/internal/Magento/Framework/Setup/Test/Unit/SchemaPersistorTest.php similarity index 98% rename from app/code/Magento/Framework/Test/Unit/Setup/SchemaPersistorTest.php rename to lib/internal/Magento/Framework/Setup/Test/Unit/SchemaPersistorTest.php index 56f04f4c7ba7..be8775444b60 100644 --- a/app/code/Magento/Framework/Test/Unit/Setup/SchemaPersistorTest.php +++ b/lib/internal/Magento/Framework/Setup/Test/Unit/SchemaPersistorTest.php @@ -4,7 +4,7 @@ * See COPYING.txt for license details. */ -namespace Magento\Framework\Test\Unit\Setup; +namespace Magento\Framework\Setup\Test\Unit; use Magento\Framework\Component\ComponentRegistrar; use Magento\Framework\Setup\SchemaListener; @@ -14,7 +14,7 @@ /** * Unit test for schema persistor. * - * @package Magento\Framework\Test\Unit\Setup + * @package Magento\Framework\Setup\Test\Unit */ class SchemaPersistorTest extends \PHPUnit\Framework\TestCase { From db3f2c73416c19f9cc13b1cbc48d504e843dc476 Mon Sep 17 00:00:00 2001 From: Alex Paliarush Date: Mon, 2 Jul 2018 16:39:47 +0300 Subject: [PATCH 02/49] Mutations Prototype (POC) #74 - Added mutation support - Added GraphQL functional test as an example of how to add mutations --- app/code/Magento/GraphQl/etc/schema.graphqls | 5 ++- .../etc/schema.graphqls | 9 +++++ .../etc/schema.graphqls | 4 ++ .../TestModule/GraphQlMutationTest.php | 37 +++++++++++++++++++ .../GraphQl/Schema/SchemaGenerator.php | 1 + 5 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 dev/tests/api-functional/testsuite/Magento/GraphQl/TestModule/GraphQlMutationTest.php diff --git a/app/code/Magento/GraphQl/etc/schema.graphqls b/app/code/Magento/GraphQl/etc/schema.graphqls index 37ca2d8d7b37..503ca17de1af 100644 --- a/app/code/Magento/GraphQl/etc/schema.graphqls +++ b/app/code/Magento/GraphQl/etc/schema.graphqls @@ -4,6 +4,9 @@ type Query { } +type Mutation { +} + input FilterTypeInput @doc(description: "FilterTypeInput specifies which action will be performed in a query ") { eq: String @doc(description: "Equals") finset: [String] @doc(description: "Find in set. The value can contain a set of comma-separated values") @@ -30,4 +33,4 @@ type SearchResultPageInfo @doc(description: "SearchResultPageInfo provides navig enum SortEnum @doc(description: "This enumeration indicates whether to return results in ascending or descending order") { ASC DESC -} \ No newline at end of file +} diff --git a/dev/tests/api-functional/_files/Magento/TestModuleGraphQlQuery/etc/schema.graphqls b/dev/tests/api-functional/_files/Magento/TestModuleGraphQlQuery/etc/schema.graphqls index 3466db5c71f6..7eb175a88e32 100644 --- a/dev/tests/api-functional/_files/Magento/TestModuleGraphQlQuery/etc/schema.graphqls +++ b/dev/tests/api-functional/_files/Magento/TestModuleGraphQlQuery/etc/schema.graphqls @@ -5,7 +5,16 @@ type Query { testItem(id: Int!) : Item @resolver(class: "Magento\\TestModuleGraphQlQuery\\Model\\Resolver\\Item") } +type Mutation { + testItem(id: Int!) : MutationItem @resolver(class: "Magento\\TestModuleGraphQlQuery\\Model\\Resolver\\Item") +} + type Item { item_id: Int name: String } + +type MutationItem { + item_id: Int + name: String +} diff --git a/dev/tests/api-functional/_files/Magento/TestModuleGraphQlQueryExtension/etc/schema.graphqls b/dev/tests/api-functional/_files/Magento/TestModuleGraphQlQueryExtension/etc/schema.graphqls index dc01d993c381..b970ad837634 100644 --- a/dev/tests/api-functional/_files/Magento/TestModuleGraphQlQueryExtension/etc/schema.graphqls +++ b/dev/tests/api-functional/_files/Magento/TestModuleGraphQlQueryExtension/etc/schema.graphqls @@ -4,3 +4,7 @@ type Item { integer_list: [Int] @resolver(class: "Magento\\TestModuleGraphQlQueryExtension\\Model\\Resolver\\IntegerList") } + +type MutationItem { + integer_list: [Int] @resolver(class: "Magento\\TestModuleGraphQlQueryExtension\\Model\\Resolver\\IntegerList") +} diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/TestModule/GraphQlMutationTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/TestModule/GraphQlMutationTest.php new file mode 100644 index 000000000000..b6e1a61f0357 --- /dev/null +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/TestModule/GraphQlMutationTest.php @@ -0,0 +1,37 @@ +graphQlQuery($query); + $this->assertArrayHasKey('testItem', $response); + $testItem = $response['testItem']; + $this->assertArrayHasKey('integer_list', $testItem); + $this->assertEquals([4, 5, 6], $testItem['integer_list']); + } +} diff --git a/lib/internal/Magento/Framework/GraphQl/Schema/SchemaGenerator.php b/lib/internal/Magento/Framework/GraphQl/Schema/SchemaGenerator.php index 668ec2bdc84e..63fef73186b1 100644 --- a/lib/internal/Magento/Framework/GraphQl/Schema/SchemaGenerator.php +++ b/lib/internal/Magento/Framework/GraphQl/Schema/SchemaGenerator.php @@ -56,6 +56,7 @@ public function generate() : Schema $schema = $this->schemaFactory->create( [ 'query' => $this->outputMapper->getOutputType('Query'), + 'mutation' => $this->outputMapper->getOutputType('Mutation'), 'typeLoader' => function ($name) { return $this->outputMapper->getOutputType($name); }, From 9074980e9c2a3e2b2d1cb86e84e16095b6e5d8a2 Mon Sep 17 00:00:00 2001 From: Scott Buchanan Date: Wed, 15 Nov 2017 18:16:23 -0500 Subject: [PATCH 03/49] prevent layout cache corruption --- lib/internal/Magento/Framework/View/Model/Layout/Merge.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/internal/Magento/Framework/View/Model/Layout/Merge.php b/lib/internal/Magento/Framework/View/Model/Layout/Merge.php index fe5c94ed21b3..26dd7e40d45f 100644 --- a/lib/internal/Magento/Framework/View/Model/Layout/Merge.php +++ b/lib/internal/Magento/Framework/View/Model/Layout/Merge.php @@ -443,6 +443,9 @@ public function load($handles = []) if ($result) { $this->addUpdate($result); $this->pageLayout = $this->_loadCache($cacheIdPageLayout); + foreach ($this->getHandles() as $handle) { + $this->allHandles[$handle] = $this->handleProcessed; + } return $this; } From eb2a5a389a0dd763df463312e80e67dc63afd608 Mon Sep 17 00:00:00 2001 From: Alex Paliarush Date: Mon, 2 Jul 2018 19:19:50 +0300 Subject: [PATCH 04/49] Mutations Prototype (POC) #74 - Added temporary placeholder field to Mutations --- app/code/Magento/GraphQl/etc/schema.graphqls | 1 + .../Magento/Framework/GraphQl/_files/schemaA.graphqls | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/app/code/Magento/GraphQl/etc/schema.graphqls b/app/code/Magento/GraphQl/etc/schema.graphqls index 503ca17de1af..c6651cdde0cb 100644 --- a/app/code/Magento/GraphQl/etc/schema.graphqls +++ b/app/code/Magento/GraphQl/etc/schema.graphqls @@ -5,6 +5,7 @@ type Query { } type Mutation { + placeholderMutation: String @doc(description: "Mutation type cannot be declared without fields. The placeholder will be removed when at least one mutation field is declared.") } input FilterTypeInput @doc(description: "FilterTypeInput specifies which action will be performed in a query ") { diff --git a/dev/tests/integration/testsuite/Magento/Framework/GraphQl/_files/schemaA.graphqls b/dev/tests/integration/testsuite/Magento/Framework/GraphQl/_files/schemaA.graphqls index d736bb4fa26f..6c832e5f122a 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/GraphQl/_files/schemaA.graphqls +++ b/dev/tests/integration/testsuite/Magento/Framework/GraphQl/_files/schemaA.graphqls @@ -2,6 +2,10 @@ type Query { placeholder: String @doc(description: "comment for placeholder.") } +type Mutation { + placeholder: String @doc(description: "comment for placeholder.") +} + input FilterTypeInput @doc(description:"Comment for FilterTypeInput") { eq: String @doc(description:"Equal") finset: [String] From d73e5449697c1e69f566bdeebe98c2cb04150033 Mon Sep 17 00:00:00 2001 From: Roman Ganin Date: Tue, 3 Jul 2018 13:33:29 -0500 Subject: [PATCH 05/49] MAGETWO-92929: Declarative schema tests are located in inappropriate place - codestyle fixes --- .../Framework/Setup/Test/Unit/SchemaListenerTest.php | 10 +++++----- .../Framework/Setup/Test/Unit/SchemaPersistorTest.php | 2 ++ 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/internal/Magento/Framework/Setup/Test/Unit/SchemaListenerTest.php b/lib/internal/Magento/Framework/Setup/Test/Unit/SchemaListenerTest.php index 2c17c1564fe6..38b81fa7c744 100644 --- a/lib/internal/Magento/Framework/Setup/Test/Unit/SchemaListenerTest.php +++ b/lib/internal/Magento/Framework/Setup/Test/Unit/SchemaListenerTest.php @@ -125,7 +125,7 @@ public function testCreateTable() 'nullable' => false, 'default' => 'CURRENT_TIMESTAMP', 'disabled' => false, - 'onCreate' => NULL, + 'onCreate' => null, ], 'integer' => [ @@ -135,9 +135,9 @@ public function testCreateTable() 'unsigned' => false, 'nullable' => false, 'identity' => true, - 'default' => NULL, + 'default' => null, 'disabled' => false, - 'onCreate' => NULL, + 'onCreate' => null, ], 'decimal' => [ @@ -147,9 +147,9 @@ public function testCreateTable() 'precision' => '25', 'unsigned' => false, 'nullable' => false, - 'default' => NULL, + 'default' => null, 'disabled' => false, - 'onCreate' => NULL, + 'onCreate' => null, ], ], $tables['First_Module']['new_table']['columns'] diff --git a/lib/internal/Magento/Framework/Setup/Test/Unit/SchemaPersistorTest.php b/lib/internal/Magento/Framework/Setup/Test/Unit/SchemaPersistorTest.php index be8775444b60..9e416fc51475 100644 --- a/lib/internal/Magento/Framework/Setup/Test/Unit/SchemaPersistorTest.php +++ b/lib/internal/Magento/Framework/Setup/Test/Unit/SchemaPersistorTest.php @@ -143,6 +143,7 @@ public function schemaListenerTablesDataProvider() ] ] ], + // @codingStandardsIgnoreStart 'XMLResult' => ' @@ -161,6 +162,7 @@ public function schemaListenerTablesDataProvider() ' + // @codingStandardsIgnoreEnd ] ]; } From 142ffbedb19c40dbe6de323f14a07a029593b6b0 Mon Sep 17 00:00:00 2001 From: John Stennett Date: Tue, 3 Jul 2018 15:14:49 -0500 Subject: [PATCH 06/49] MQE-920: MSI MFTF Test Cases 2 - Merging MSI elements into the Product Form Configuration Section file. - Moving a "ConfigurableProduct" module section to the "ConfigurableProduct" module under 'app/code'. --- .../Mftf}/Section/AdminProductFormConfigurationsSection.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) rename {dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct => app/code/Magento/ConfigurableProduct/Test/Mftf}/Section/AdminProductFormConfigurationsSection.xml (87%) diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Section/AdminProductFormConfigurationsSection.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminProductFormConfigurationsSection.xml similarity index 87% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Section/AdminProductFormConfigurationsSection.xml rename to app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminProductFormConfigurationsSection.xml index 43bf9822903b..8a22d3fd8afc 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Section/AdminProductFormConfigurationsSection.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminProductFormConfigurationsSection.xml @@ -25,7 +25,7 @@
- +
@@ -34,7 +34,9 @@
- + + +
From 11e1917d0a90c053f38fc86259180184602fec45 Mon Sep 17 00:00:00 2001 From: John Stennett Date: Tue, 3 Jul 2018 15:20:03 -0500 Subject: [PATCH 07/49] MQE-920: MSI MFTF Test Cases 2 - Merging MSI elements into the Product Form Configuration Section file under UI. - Moving a "Ui" module section to the "Ui" module under 'app/code'. --- .../AdminGridFilterSearchResultsActionGroup.xml | 4 ++-- .../Ui/Section/AdminGridControlsSection.xml | 17 +++++++++++++++-- .../Ui/Section/AdminMessagesSection.xml | 15 +++++++++++++++ 3 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/AdminMessagesSection.xml diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/ActionGroup/AdminGridFilterSearchResultsActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/ActionGroup/AdminGridFilterSearchResultsActionGroup.xml index 459ad5070da0..191fd1b4183d 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/ActionGroup/AdminGridFilterSearchResultsActionGroup.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/ActionGroup/AdminGridFilterSearchResultsActionGroup.xml @@ -11,10 +11,10 @@ - + - + diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/AdminGridControlsSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/AdminGridControlsSection.xml index 91bf1001a40c..16f9ab124993 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/AdminGridControlsSection.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/AdminGridControlsSection.xml @@ -27,7 +27,7 @@ - +
@@ -54,7 +54,8 @@
- + +
@@ -65,4 +66,16 @@
+
+ + + + +
+
+ + + + +
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/AdminMessagesSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/AdminMessagesSection.xml new file mode 100644 index 000000000000..a727104f4801 --- /dev/null +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/AdminMessagesSection.xml @@ -0,0 +1,15 @@ + + + + +
+ + +
+
From 64af22f6f19e1cabb5a5a1ccd1262944f1201376 Mon Sep 17 00:00:00 2001 From: John Stennett Date: Tue, 3 Jul 2018 15:40:41 -0500 Subject: [PATCH 08/49] MQE-920: MSI MFTF Test Cases 2 - Adding necessary CatalogInventory section files to the "CatalogInventory" module under "app/code". --- .../Section/AdminAdvancedInventorySection.xml | 20 +++++++++++++++++++ .../Section/ProductStockOptionsSection.xml | 16 +++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 app/code/Magento/CatalogInventory/Test/Mftf/Section/AdminAdvancedInventorySection.xml create mode 100644 app/code/Magento/CatalogInventory/Test/Mftf/Section/ProductStockOptionsSection.xml diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/Section/AdminAdvancedInventorySection.xml b/app/code/Magento/CatalogInventory/Test/Mftf/Section/AdminAdvancedInventorySection.xml new file mode 100644 index 000000000000..0a51d778a02f --- /dev/null +++ b/app/code/Magento/CatalogInventory/Test/Mftf/Section/AdminAdvancedInventorySection.xml @@ -0,0 +1,20 @@ + + + + +
+ +
+
+ + + + +
+
diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/Section/ProductStockOptionsSection.xml b/app/code/Magento/CatalogInventory/Test/Mftf/Section/ProductStockOptionsSection.xml new file mode 100644 index 000000000000..958d774a7641 --- /dev/null +++ b/app/code/Magento/CatalogInventory/Test/Mftf/Section/ProductStockOptionsSection.xml @@ -0,0 +1,16 @@ + + + +
+ + + + + +
+
From 13f79696847aa93c4143dfcd093bd2892e2a4cbb Mon Sep 17 00:00:00 2001 From: John Stennett Date: Tue, 3 Jul 2018 16:01:20 -0500 Subject: [PATCH 09/49] MQE-920: MSI MFTF Test Cases 2 - Merging necessary Checkout Action Group/Section to the Checkout module. - Moving necessary Checkout files to the "app/code" directory. --- .../StorefrontProductCartActionGroup.xml | 18 ++++++++++++++++++ .../Section/StorefrontMiniCartSection.xml | 2 ++ 2 files changed, 20 insertions(+) rename {dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout => app/code/Magento/Checkout/Test/Mftf}/ActionGroup/StorefrontProductCartActionGroup.xml (77%) rename {dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout => app/code/Magento/Checkout/Test/Mftf}/Section/StorefrontMiniCartSection.xml (88%) diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/ActionGroup/StorefrontProductCartActionGroup.xml b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontProductCartActionGroup.xml similarity index 77% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/ActionGroup/StorefrontProductCartActionGroup.xml rename to app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontProductCartActionGroup.xml index b98e1046c4a5..acd932771dd2 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/ActionGroup/StorefrontProductCartActionGroup.xml +++ b/app/code/Magento/Checkout/Test/Mftf/ActionGroup/StorefrontProductCartActionGroup.xml @@ -21,6 +21,24 @@ + + + + + + + + + + + + + + + + + + diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/StorefrontMiniCartSection.xml b/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontMiniCartSection.xml similarity index 88% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/StorefrontMiniCartSection.xml rename to app/code/Magento/Checkout/Test/Mftf/Section/StorefrontMiniCartSection.xml index bdd97130a971..b421eef74b8e 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Section/StorefrontMiniCartSection.xml +++ b/app/code/Magento/Checkout/Test/Mftf/Section/StorefrontMiniCartSection.xml @@ -23,5 +23,7 @@ + +
From 1acd06f76508ecf46f87a477aff691e504549fb6 Mon Sep 17 00:00:00 2001 From: mdykas Date: Fri, 18 May 2018 15:40:01 +0200 Subject: [PATCH 10/49] issue/14056 - Coupon API not working for guest user --- app/code/Magento/Quote/Model/CouponManagement.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/code/Magento/Quote/Model/CouponManagement.php b/app/code/Magento/Quote/Model/CouponManagement.php index 62515a17f268..55c21c974d6d 100644 --- a/app/code/Magento/Quote/Model/CouponManagement.php +++ b/app/code/Magento/Quote/Model/CouponManagement.php @@ -55,6 +55,9 @@ public function set($cartId, $couponCode) if (!$quote->getItemsCount()) { throw new NoSuchEntityException(__('The "%1" Cart doesn\'t contain products.', $cartId)); } + if (!$quote->getStoreId()) { + throw new NoSuchEntityException(__('Cart isn\'t assigned to correct store')); + } $quote->getShippingAddress()->setCollectShippingRates(true); try { From 2651be335ea19d68cdf0989694a35c70e44de45f Mon Sep 17 00:00:00 2001 From: mdykas Date: Thu, 24 May 2018 14:49:35 +0200 Subject: [PATCH 11/49] issue/14056 - Coupon API not working for guest user - adjusted unit tests --- .../Quote/Test/Unit/Model/CouponManagementTest.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/code/Magento/Quote/Test/Unit/Model/CouponManagementTest.php b/app/code/Magento/Quote/Test/Unit/Model/CouponManagementTest.php index e6ba50e35b4c..91211904c11e 100644 --- a/app/code/Magento/Quote/Test/Unit/Model/CouponManagementTest.php +++ b/app/code/Magento/Quote/Test/Unit/Model/CouponManagementTest.php @@ -47,6 +47,7 @@ protected function setUp() 'save', 'getShippingAddress', 'getCouponCode', + 'getStoreId', '__wakeup' ]); $this->quoteAddressMock = $this->createPartialMock(\Magento\Quote\Model\Quote\Address::class, [ @@ -98,6 +99,9 @@ public function testSetWhenCouldNotApplyCoupon() $cartId = 33; $couponCode = '153a-ABC'; + $this->storeMock->expects($this->any())->method('getId')->will($this->returnValue(1)); + $this->quoteMock->expects($this->once())->method('getStoreId')->willReturn($this->returnValue(1)); + $this->quoteRepositoryMock->expects($this->once()) ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); $this->quoteMock->expects($this->once())->method('getItemsCount')->will($this->returnValue(12)); @@ -125,6 +129,9 @@ public function testSetWhenCouponCodeIsInvalid() $cartId = 33; $couponCode = '153a-ABC'; + $this->storeMock->expects($this->any())->method('getId')->will($this->returnValue(1)); + $this->quoteMock->expects($this->once())->method('getStoreId')->willReturn($this->returnValue(1)); + $this->quoteRepositoryMock->expects($this->once()) ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); $this->quoteMock->expects($this->once())->method('getItemsCount')->will($this->returnValue(12)); @@ -144,6 +151,9 @@ public function testSet() $cartId = 33; $couponCode = '153a-ABC'; + $this->storeMock->expects($this->any())->method('getId')->will($this->returnValue(1)); + $this->quoteMock->expects($this->once())->method('getStoreId')->willReturn($this->returnValue(1)); + $this->quoteRepositoryMock->expects($this->once()) ->method('getActive')->with($cartId)->will($this->returnValue($this->quoteMock)); $this->quoteMock->expects($this->once())->method('getItemsCount')->will($this->returnValue(12)); From be413cd7027debb7cc63f938292eb7ad1e2efe10 Mon Sep 17 00:00:00 2001 From: John Stennett Date: Thu, 5 Jul 2018 11:09:44 -0500 Subject: [PATCH 12/49] MQE-1267: MSI MFTF Test Cases 4 - Adding necessary Action Groups, Sections and Data to the Bundle, GroupedProduct, Sales and Store modules. (cherry picked from commit 9f1f998) --- .../StorefrontProductCartActionGroup.xml | 27 ++++++ .../StorefrontProductActionSection.xml | 15 ++++ .../AdminGroupedProductActionGroup.xml | 9 ++ .../AdminAddProductsToGroupPanelSection.xml | 4 + .../ActionGroup/AdminOrderActionGroup.xml | 88 ++++++++++++++++--- .../AdminOrderCustomersGridSection.xml | 18 ++++ .../AdminOrderFormBundleProductSection.xml | 15 ++++ ...minOrderFormDownloadableProductSection.xml | 16 ++++ .../AdminOrderFormGroupedProductSection.xml | 15 ++++ .../AdminCreateStoreGroupActionGroup.xml | 26 ++++++ .../DeleteCustomWebsiteActionGroup.xml | 27 ++++++ .../Store/Test/Mftf}/Data/StoreGroupData.xml | 9 ++ .../Store/Test/Mftf/Data/WebsiteData.xml | 22 +++++ .../AdminNewStoreGroupActionsSection.xml | 15 ++++ .../AdminStoresDeleteWebsiteSection.xml | 13 +++ 15 files changed, 309 insertions(+), 10 deletions(-) create mode 100644 app/code/Magento/Bundle/Test/Mftf/ActionGroup/StorefrontProductCartActionGroup.xml create mode 100644 app/code/Magento/Bundle/Test/Mftf/Section/StorefrontProductActionSection.xml rename {dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct => app/code/Magento/GroupedProduct/Test/Mftf}/ActionGroup/AdminGroupedProductActionGroup.xml (87%) rename {dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct => app/code/Magento/GroupedProduct/Test/Mftf}/Section/AdminAddProductsToGroupPanelSection.xml (82%) rename {dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales => app/code/Magento/Sales/Test/Mftf}/ActionGroup/AdminOrderActionGroup.xml (66%) create mode 100644 app/code/Magento/Sales/Test/Mftf/Section/AdminOrderCustomersGridSection.xml create mode 100644 app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormBundleProductSection.xml create mode 100644 app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormDownloadableProductSection.xml create mode 100644 app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormGroupedProductSection.xml create mode 100644 app/code/Magento/Store/Test/Mftf/ActionGroup/AdminCreateStoreGroupActionGroup.xml create mode 100644 app/code/Magento/Store/Test/Mftf/ActionGroup/DeleteCustomWebsiteActionGroup.xml rename {dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store => app/code/Magento/Store/Test/Mftf}/Data/StoreGroupData.xml (69%) create mode 100644 app/code/Magento/Store/Test/Mftf/Data/WebsiteData.xml create mode 100644 app/code/Magento/Store/Test/Mftf/Section/AdminNewStoreGroupActionsSection.xml create mode 100644 app/code/Magento/Store/Test/Mftf/Section/AdminStoresDeleteWebsiteSection.xml diff --git a/app/code/Magento/Bundle/Test/Mftf/ActionGroup/StorefrontProductCartActionGroup.xml b/app/code/Magento/Bundle/Test/Mftf/ActionGroup/StorefrontProductCartActionGroup.xml new file mode 100644 index 000000000000..52846152eacd --- /dev/null +++ b/app/code/Magento/Bundle/Test/Mftf/ActionGroup/StorefrontProductCartActionGroup.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/app/code/Magento/Bundle/Test/Mftf/Section/StorefrontProductActionSection.xml b/app/code/Magento/Bundle/Test/Mftf/Section/StorefrontProductActionSection.xml new file mode 100644 index 000000000000..abc9bc6dab54 --- /dev/null +++ b/app/code/Magento/Bundle/Test/Mftf/Section/StorefrontProductActionSection.xml @@ -0,0 +1,15 @@ + + + +
+ + + +
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/ActionGroup/AdminGroupedProductActionGroup.xml b/app/code/Magento/GroupedProduct/Test/Mftf/ActionGroup/AdminGroupedProductActionGroup.xml similarity index 87% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/ActionGroup/AdminGroupedProductActionGroup.xml rename to app/code/Magento/GroupedProduct/Test/Mftf/ActionGroup/AdminGroupedProductActionGroup.xml index 85762fd45e16..79550b47820b 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/ActionGroup/AdminGroupedProductActionGroup.xml +++ b/app/code/Magento/GroupedProduct/Test/Mftf/ActionGroup/AdminGroupedProductActionGroup.xml @@ -43,4 +43,13 @@ + + + + + + + + + diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Section/AdminAddProductsToGroupPanelSection.xml b/app/code/Magento/GroupedProduct/Test/Mftf/Section/AdminAddProductsToGroupPanelSection.xml similarity index 82% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Section/AdminAddProductsToGroupPanelSection.xml rename to app/code/Magento/GroupedProduct/Test/Mftf/Section/AdminAddProductsToGroupPanelSection.xml index 45e32e7f2cd0..5c23ad4e9afb 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Section/AdminAddProductsToGroupPanelSection.xml +++ b/app/code/Magento/GroupedProduct/Test/Mftf/Section/AdminAddProductsToGroupPanelSection.xml @@ -16,4 +16,8 @@
+ +
+ +
\ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/ActionGroup/AdminOrderActionGroup.xml b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml similarity index 66% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/ActionGroup/AdminOrderActionGroup.xml rename to app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml index f041ac97e5ca..c8426165861f 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Sales/ActionGroup/AdminOrderActionGroup.xml +++ b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml @@ -22,6 +22,24 @@ + + + + + + + + + + + + + + + + + + @@ -84,6 +102,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -137,14 +215,4 @@ - - - - - - - - - - diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderCustomersGridSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderCustomersGridSection.xml new file mode 100644 index 000000000000..c91a1e2aef69 --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderCustomersGridSection.xml @@ -0,0 +1,18 @@ + + + + +
+ + + + + +
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormBundleProductSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormBundleProductSection.xml new file mode 100644 index 000000000000..a035e47394d5 --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormBundleProductSection.xml @@ -0,0 +1,15 @@ + + + + +
+ + +
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormDownloadableProductSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormDownloadableProductSection.xml new file mode 100644 index 000000000000..b77b01d54f95 --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormDownloadableProductSection.xml @@ -0,0 +1,16 @@ + + + + +
+ + + +
+
diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormGroupedProductSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormGroupedProductSection.xml new file mode 100644 index 000000000000..ceba11f74ae8 --- /dev/null +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderFormGroupedProductSection.xml @@ -0,0 +1,15 @@ + + + + +
+ + +
+
diff --git a/app/code/Magento/Store/Test/Mftf/ActionGroup/AdminCreateStoreGroupActionGroup.xml b/app/code/Magento/Store/Test/Mftf/ActionGroup/AdminCreateStoreGroupActionGroup.xml new file mode 100644 index 000000000000..0819a74ea899 --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/ActionGroup/AdminCreateStoreGroupActionGroup.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/app/code/Magento/Store/Test/Mftf/ActionGroup/DeleteCustomWebsiteActionGroup.xml b/app/code/Magento/Store/Test/Mftf/ActionGroup/DeleteCustomWebsiteActionGroup.xml new file mode 100644 index 000000000000..0f8673eb2f4a --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/ActionGroup/DeleteCustomWebsiteActionGroup.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Data/StoreGroupData.xml b/app/code/Magento/Store/Test/Mftf/Data/StoreGroupData.xml similarity index 69% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Data/StoreGroupData.xml rename to app/code/Magento/Store/Test/Mftf/Data/StoreGroupData.xml index 891d30780876..a42c6a20df0d 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Store/Data/StoreGroupData.xml +++ b/app/code/Magento/Store/Test/Mftf/Data/StoreGroupData.xml @@ -21,4 +21,13 @@ add group + + null + Store Group Custom Website + store_group_custom_website + 2 + add + group + customWebsite + diff --git a/app/code/Magento/Store/Test/Mftf/Data/WebsiteData.xml b/app/code/Magento/Store/Test/Mftf/Data/WebsiteData.xml new file mode 100644 index 000000000000..e8528fba1ae2 --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/Data/WebsiteData.xml @@ -0,0 +1,22 @@ + + + + + Main Website + base + 0 + + + Second Website + second_website + 10 + add + website + null + + diff --git a/app/code/Magento/Store/Test/Mftf/Section/AdminNewStoreGroupActionsSection.xml b/app/code/Magento/Store/Test/Mftf/Section/AdminNewStoreGroupActionsSection.xml new file mode 100644 index 000000000000..f026c7765b6d --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/Section/AdminNewStoreGroupActionsSection.xml @@ -0,0 +1,15 @@ + + + +
+ + + + +
+
diff --git a/app/code/Magento/Store/Test/Mftf/Section/AdminStoresDeleteWebsiteSection.xml b/app/code/Magento/Store/Test/Mftf/Section/AdminStoresDeleteWebsiteSection.xml new file mode 100644 index 000000000000..50c536dcfe80 --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/Section/AdminStoresDeleteWebsiteSection.xml @@ -0,0 +1,13 @@ + + + +
+ + +
+
From 4f1925f6788a03dd30280534ab5ec435feff26b4 Mon Sep 17 00:00:00 2001 From: John Stennett Date: Thu, 5 Jul 2018 11:23:30 -0500 Subject: [PATCH 13/49] MQE-1267: MSI MFTF Test Cases 4 - Adding missing Action Group. (cherry picked from commit b36a5f9) --- .../Test/Mftf/ActionGroup/AdminOrderActionGroup.xml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml index c8426165861f..c27c4d229213 100644 --- a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml +++ b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml @@ -215,4 +215,14 @@ + + + + + + + + + + From f17785c12cd34b065f2c9f1e6506ef941d9a3392 Mon Sep 17 00:00:00 2001 From: John Stennett Date: Thu, 5 Jul 2018 11:39:46 -0500 Subject: [PATCH 14/49] MQE-1121: MSI MFTF Test Cases 4 Updates - Adding "msi-suite.xml" file. --- .../acceptance/tests/_suite/msi-suite.xml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 dev/tests/acceptance/tests/_suite/msi-suite.xml diff --git a/dev/tests/acceptance/tests/_suite/msi-suite.xml b/dev/tests/acceptance/tests/_suite/msi-suite.xml new file mode 100644 index 000000000000..b96451d58871 --- /dev/null +++ b/dev/tests/acceptance/tests/_suite/msi-suite.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + From e2c4acae5974c91e16a437e027b06affa4a97822 Mon Sep 17 00:00:00 2001 From: Volodymyr Kublytskyi Date: Fri, 6 Jul 2018 13:25:37 +0300 Subject: [PATCH 15/49] Fix of invalid price for integer currencies when amount less then group size --- lib/internal/Magento/Framework/Locale/Format.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/internal/Magento/Framework/Locale/Format.php b/lib/internal/Magento/Framework/Locale/Format.php index 00379c87daaf..89f695701187 100644 --- a/lib/internal/Magento/Framework/Locale/Format.php +++ b/lib/internal/Magento/Framework/Locale/Format.php @@ -131,7 +131,6 @@ public function getPriceFormat($localeCode = null, $currencyCode = null) } else { $group = strrpos($format, '.'); } - $integerRequired = strpos($format, '.') - strpos($format, '0'); $result = [ //TODO: change interface @@ -141,7 +140,7 @@ public function getPriceFormat($localeCode = null, $currencyCode = null) 'decimalSymbol' => $decimalSymbol, 'groupSymbol' => $groupSymbol, 'groupLength' => $group, - 'integerRequired' => $integerRequired, + 'integerRequired' => $totalPrecision == 0, ]; return $result; From 55b3db85ed4c4ffe9844f2967a856edc27135afa Mon Sep 17 00:00:00 2001 From: John Stennett Date: Fri, 6 Jul 2018 08:34:59 -0500 Subject: [PATCH 16/49] MQE-1267: MSI MFTF Test Cases 4 - Removing commented out selector. --- .../Catalog/Section/AdminProductFormActionSection.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductFormActionSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductFormActionSection.xml index e55a45d59091..d72830674808 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductFormActionSection.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminProductFormActionSection.xml @@ -12,8 +12,7 @@ - - + From 516566ac2d8b08b4e95003463362af457847ff93 Mon Sep 17 00:00:00 2001 From: Arnoud Beekman Date: Thu, 5 Jul 2018 21:36:49 +0200 Subject: [PATCH 17/49] Make it possible to disable cross-sell on cart page To be able to select whether to have the cross-sell active on the cart page an admin configuration is created under Stores > Configuration > Sales > Checkout > Shopping Cart. The default for this setting is set to Yes (Show cross-sell items). This is for backwards compatibility and not have webshop owners accidentally not showing these items. Because this is now sorted as the 3rd configuration in this section/group the extra configurations for the grouped product image and the configurable product image are now also increased. This feature will make it possible to have this cross-sell turned off during special sales, A/B testing or in a specific store view. --- app/code/Magento/Checkout/etc/adminhtml/system.xml | 4 ++++ app/code/Magento/Checkout/etc/config.xml | 1 + app/code/Magento/Checkout/i18n/en_US.csv | 3 ++- .../Checkout/view/frontend/layout/checkout_cart_index.xml | 2 +- app/code/Magento/ConfigurableProduct/etc/adminhtml/system.xml | 2 +- app/code/Magento/GroupedProduct/etc/adminhtml/system.xml | 2 +- 6 files changed, 10 insertions(+), 4 deletions(-) diff --git a/app/code/Magento/Checkout/etc/adminhtml/system.xml b/app/code/Magento/Checkout/etc/adminhtml/system.xml index 6947e1162600..11e3ba5f3ed9 100644 --- a/app/code/Magento/Checkout/etc/adminhtml/system.xml +++ b/app/code/Magento/Checkout/etc/adminhtml/system.xml @@ -41,6 +41,10 @@ + + + Magento\Config\Model\Config\Source\Yesno + diff --git a/app/code/Magento/Checkout/etc/config.xml b/app/code/Magento/Checkout/etc/config.xml index 3c24c38ecf85..e1ba4381f223 100644 --- a/app/code/Magento/Checkout/etc/config.xml +++ b/app/code/Magento/Checkout/etc/config.xml @@ -17,6 +17,7 @@ 30 0 20 + 1 1 diff --git a/app/code/Magento/Checkout/i18n/en_US.csv b/app/code/Magento/Checkout/i18n/en_US.csv index 53fdebb8a299..c6bb23fecac1 100644 --- a/app/code/Magento/Checkout/i18n/en_US.csv +++ b/app/code/Magento/Checkout/i18n/en_US.csv @@ -176,4 +176,5 @@ Payment,Payment "Not yet calculated","Not yet calculated" "We received your order!","We received your order!" "Thank you for your purchase!","Thank you for your purchase!" -"Password", "Password" +Password,Password +"Show Cross-sell Items in the Shopping Cart","Show Cross-sell Items in the Shopping Cart" diff --git a/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml b/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml index ff4c6dbd35ff..69d2523d88df 100644 --- a/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml +++ b/app/code/Magento/Checkout/view/frontend/layout/checkout_cart_index.xml @@ -186,7 +186,7 @@ - + crosssell diff --git a/app/code/Magento/ConfigurableProduct/etc/adminhtml/system.xml b/app/code/Magento/ConfigurableProduct/etc/adminhtml/system.xml index ba52b51d6b07..86baea3c0d29 100644 --- a/app/code/Magento/ConfigurableProduct/etc/adminhtml/system.xml +++ b/app/code/Magento/ConfigurableProduct/etc/adminhtml/system.xml @@ -9,7 +9,7 @@
- + Magento\Catalog\Model\Config\Source\Product\Thumbnail diff --git a/app/code/Magento/GroupedProduct/etc/adminhtml/system.xml b/app/code/Magento/GroupedProduct/etc/adminhtml/system.xml index bbb2054abb14..5854928afc2f 100644 --- a/app/code/Magento/GroupedProduct/etc/adminhtml/system.xml +++ b/app/code/Magento/GroupedProduct/etc/adminhtml/system.xml @@ -9,7 +9,7 @@
- + Magento\Catalog\Model\Config\Source\Product\Thumbnail From b7b03f988f6f7fbba3ad8c0d8c0a36dccb07cfb1 Mon Sep 17 00:00:00 2001 From: itaymesh Date: Tue, 19 Jun 2018 19:49:31 +0300 Subject: [PATCH 18/49] Update Israeli ZIP code mask, 7 digits instead of 5 ,according to the Israeli postal office --- app/code/Magento/Directory/etc/zip_codes.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Directory/etc/zip_codes.xml b/app/code/Magento/Directory/etc/zip_codes.xml index d9041d1ff50a..3c540f7ce0ff 100644 --- a/app/code/Magento/Directory/etc/zip_codes.xml +++ b/app/code/Magento/Directory/etc/zip_codes.xml @@ -196,7 +196,7 @@ - ^[0-9]{5}$ + ^[0-9]{7}$ From e4b7eef3d09110e9faec35f166ea8ed02dc71503 Mon Sep 17 00:00:00 2001 From: Valerij Ivashchenko Date: Mon, 11 Jun 2018 15:47:43 +0300 Subject: [PATCH 19/49] small refactoring to better code readability --- .../Block/Widget/Form/Element/Dependence.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php b/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php index 723deab1e9f7..c3f83e06858d 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php @@ -124,14 +124,17 @@ protected function _toHtml() if (!$this->_depends) { return ''; } - return ''; + + $dependsJson = $this->_getDependsJson(); + $configOptions = $this->_configOptions ? $this->_jsonEncoder->encode($this->_configOptions) : null; + $configOptionsStr = $configOptions ? ', ' . $configOptions : ''; + $paramsStr = $dependsJson . $configOptionsStr; + + return ""; } /** From 08051c0a608dc9c7cacddf56f14fa3888b42b684 Mon Sep 17 00:00:00 2001 From: Valerij Ivashchenko Date: Tue, 12 Jun 2018 10:57:28 +0300 Subject: [PATCH 20/49] improve params string creation according to @orlangur suggestion --- .../Block/Widget/Form/Element/Dependence.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php b/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php index c3f83e06858d..eff49c3b75ab 100644 --- a/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php +++ b/app/code/Magento/Backend/Block/Widget/Form/Element/Dependence.php @@ -125,14 +125,15 @@ protected function _toHtml() return ''; } - $dependsJson = $this->_getDependsJson(); - $configOptions = $this->_configOptions ? $this->_jsonEncoder->encode($this->_configOptions) : null; - $configOptionsStr = $configOptions ? ', ' . $configOptions : ''; - $paramsStr = $dependsJson . $configOptionsStr; + $params = $this->_getDependsJson(); + + if ($this->_configOptions) { + $params .= ', ' . $this->_jsonEncoder->encode($this->_configOptions); + } return ""; } From 28167648ab16a1a8f18792420b33badbcc6423b6 Mon Sep 17 00:00:00 2001 From: Alexander Lukyanov Date: Thu, 10 May 2018 14:19:38 -0400 Subject: [PATCH 21/49] Issue #11354 Merged CSS file name generation --- .../Magento/Framework/View/Asset/Merged.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) mode change 100644 => 100755 lib/internal/Magento/Framework/View/Asset/Merged.php diff --git a/lib/internal/Magento/Framework/View/Asset/Merged.php b/lib/internal/Magento/Framework/View/Asset/Merged.php old mode 100644 new mode 100755 index 5b206b235eb1..943f3eba0632 --- a/lib/internal/Magento/Framework/View/Asset/Merged.php +++ b/lib/internal/Magento/Framework/View/Asset/Merged.php @@ -40,6 +40,11 @@ class Merged implements \Iterator */ protected $contentType; + /** + * @var StorageInterface + */ + private $versionStorage; + /** * @var bool */ @@ -56,11 +61,13 @@ public function __construct( \Psr\Log\LoggerInterface $logger, MergeStrategyInterface $mergeStrategy, \Magento\Framework\View\Asset\Repository $assetRepo, + \Magento\Framework\App\View\Deployment\Version\StorageInterface $versionStorage, array $assets ) { $this->logger = $logger; $this->mergeStrategy = $mergeStrategy; $this->assetRepo = $assetRepo; + $this->versionStorage = $versionStorage; if (!$assets) { throw new \InvalidArgumentException('At least one asset has to be passed for merging.'); @@ -116,6 +123,12 @@ private function createMergedAsset(array $assets) $paths[] = $asset->getPath(); } $paths = array_unique($paths); + + $version=$this->versionStorage->load(); + if ($version) { + $paths[]=$version; + } + $filePath = md5(implode('|', $paths)) . '.' . $this->contentType; return $this->assetRepo->createArbitrary($filePath, self::getRelativeDir()); } From 2d31c1d2dc7355bb9a31413cdc481e30d3d060f9 Mon Sep 17 00:00:00 2001 From: Alex Lukyanau Date: Thu, 10 May 2018 19:39:01 -0400 Subject: [PATCH 22/49] Regenerated Doc for function --- lib/internal/Magento/Framework/View/Asset/Merged.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/internal/Magento/Framework/View/Asset/Merged.php b/lib/internal/Magento/Framework/View/Asset/Merged.php index 943f3eba0632..ae38bda0f173 100755 --- a/lib/internal/Magento/Framework/View/Asset/Merged.php +++ b/lib/internal/Magento/Framework/View/Asset/Merged.php @@ -50,10 +50,14 @@ class Merged implements \Iterator */ protected $isInitialized = false; + /** + * Merged constructor. + * * @param \Psr\Log\LoggerInterface $logger * @param MergeStrategyInterface $mergeStrategy * @param \Magento\Framework\View\Asset\Repository $assetRepo + * @param \Magento\Framework\App\View\Deployment\Version\StorageInterface $versionStorage * @param MergeableInterface[] $assets * @throws \InvalidArgumentException */ From e7677e8c3381915fbc6f0f213b02781dea4b9b2d Mon Sep 17 00:00:00 2001 From: Alex Lukyanau Date: Thu, 10 May 2018 19:39:31 -0400 Subject: [PATCH 23/49] Removed whitespace --- lib/internal/Magento/Framework/View/Asset/Merged.php | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/internal/Magento/Framework/View/Asset/Merged.php b/lib/internal/Magento/Framework/View/Asset/Merged.php index ae38bda0f173..2dddc2e59d9a 100755 --- a/lib/internal/Magento/Framework/View/Asset/Merged.php +++ b/lib/internal/Magento/Framework/View/Asset/Merged.php @@ -50,7 +50,6 @@ class Merged implements \Iterator */ protected $isInitialized = false; - /** * Merged constructor. * From ca3c79c538465d4053b5eeffb79b21327d03a112 Mon Sep 17 00:00:00 2001 From: Alex Lukyanau Date: Fri, 11 May 2018 01:07:21 -0400 Subject: [PATCH 24/49] Travic CI Test case errors --- .../Magento/Framework/View/Asset/Merged.php | 2 +- .../Framework/View/Test/Unit/Asset/MergedTest.php | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) mode change 100644 => 100755 lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php diff --git a/lib/internal/Magento/Framework/View/Asset/Merged.php b/lib/internal/Magento/Framework/View/Asset/Merged.php index 2dddc2e59d9a..57105ab231e0 100755 --- a/lib/internal/Magento/Framework/View/Asset/Merged.php +++ b/lib/internal/Magento/Framework/View/Asset/Merged.php @@ -41,7 +41,7 @@ class Merged implements \Iterator protected $contentType; /** - * @var StorageInterface + * @var \Magento\Framework\App\View\Deployment\Version\StorageInterface */ private $versionStorage; diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php old mode 100644 new mode 100755 index 164a2ca4d4d1..34a19c346a64 --- a/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php @@ -12,6 +12,7 @@ use Magento\Framework\View\Asset\Repository as AssetRepository; use Magento\Framework\View\Asset\MergeableInterface; use Magento\Framework\View\Asset\MergeStrategyInterface; +use Magento\Framework\App\View\Deployment\Version\StorageInterface; /** * Class MergedTest @@ -43,6 +44,11 @@ class MergedTest extends \PHPUnit\Framework\TestCase */ private $assetRepo; + /** + * @var StorageInterface|\PHPUnit_Framework_MockObject_MockObject + */ + private $versionStorage; + protected function setUp() { $this->assetJsOne = $this->getMockForAbstractClass(MergeableInterface::class); @@ -66,6 +72,7 @@ protected function setUp() $this->assetRepo = $this->getMockBuilder(AssetRepository::class) ->disableOriginalConstructor() ->getMock(); + $this->versionStorage = $this->createMock(StorageInterface::class); } /** @@ -74,7 +81,7 @@ protected function setUp() */ public function testConstructorNothingToMerge() { - new \Magento\Framework\View\Asset\Merged($this->logger, $this->mergeStrategy, $this->assetRepo, []); + new \Magento\Framework\View\Asset\Merged($this->logger, $this->mergeStrategy, $this->assetRepo, $this->versionStorage, []); } /** @@ -89,6 +96,7 @@ public function testConstructorRequireMergeInterface() 'logger' => $this->logger, 'mergeStrategy' => $this->mergeStrategy, 'assetRepo' => $this->assetRepo, + 'versionStorage' => $this->versionStorage, 'assets' => [$this->assetJsOne, $assetUrl], ]); } @@ -108,6 +116,7 @@ public function testConstructorIncompatibleContentTypes() 'logger' => $this->logger, 'mergeStrategy' => $this->mergeStrategy, 'assetRepo' => $this->assetRepo, + 'versionStorage' => $this->versionStorage, 'assets' => [$this->assetJsOne, $assetCss], ]); } @@ -123,6 +132,7 @@ public function testIteratorInterfaceMerge() 'logger' => $this->logger, 'mergeStrategy' => $this->mergeStrategy, 'assetRepo' => $this->assetRepo, + 'versionStorage' => $this->versionStorage, 'assets' => $assets, ]); @@ -157,6 +167,7 @@ public function testIteratorInterfaceMergeFailure() 'logger' => $this->logger, 'mergeStrategy' => $this->mergeStrategy, 'assetRepo' => $this->assetRepo, + 'versionStorage' => $this->versionStorage, 'assets' => [$this->assetJsOne, $this->assetJsTwo, $assetBroken], ]); From 311f8ca9aa283d9bcd3ab45327db3363223094de Mon Sep 17 00:00:00 2001 From: Alex Lukyanau Date: Fri, 11 May 2018 01:29:53 -0400 Subject: [PATCH 25/49] Travic CI - This pull request quality could be better. --- .../Magento/Framework/View/Test/Unit/Asset/MergedTest.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php index 34a19c346a64..2f7742f5ccbd 100755 --- a/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php @@ -81,7 +81,12 @@ protected function setUp() */ public function testConstructorNothingToMerge() { - new \Magento\Framework\View\Asset\Merged($this->logger, $this->mergeStrategy, $this->assetRepo, $this->versionStorage, []); + new \Magento\Framework\View\Asset\Merged( + $this->logger, $this->mergeStrategy, + $this->assetRepo, + $this->versionStorage, + [] + ); } /** From 1782c54b76613323034eefda53ec85a4d4fa17ba Mon Sep 17 00:00:00 2001 From: Stanislav Idolov Date: Fri, 11 May 2018 09:11:59 +0300 Subject: [PATCH 26/49] Minor fixes --- .../Magento/Framework/View/Asset/Merged.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/internal/Magento/Framework/View/Asset/Merged.php b/lib/internal/Magento/Framework/View/Asset/Merged.php index 57105ab231e0..302eb1226b8e 100755 --- a/lib/internal/Magento/Framework/View/Asset/Merged.php +++ b/lib/internal/Magento/Framework/View/Asset/Merged.php @@ -5,6 +5,8 @@ */ namespace Magento\Framework\View\Asset; +use Magento\Framework\App\ObjectManager; + /** * \Iterator that aggregates one or more assets and provides a single public file with equivalent behavior */ @@ -56,21 +58,23 @@ class Merged implements \Iterator * @param \Psr\Log\LoggerInterface $logger * @param MergeStrategyInterface $mergeStrategy * @param \Magento\Framework\View\Asset\Repository $assetRepo - * @param \Magento\Framework\App\View\Deployment\Version\StorageInterface $versionStorage * @param MergeableInterface[] $assets + * @param \Magento\Framework\App\View\Deployment\Version\StorageInterface $versionStorage * @throws \InvalidArgumentException */ public function __construct( \Psr\Log\LoggerInterface $logger, MergeStrategyInterface $mergeStrategy, \Magento\Framework\View\Asset\Repository $assetRepo, - \Magento\Framework\App\View\Deployment\Version\StorageInterface $versionStorage, - array $assets + array $assets, + \Magento\Framework\App\View\Deployment\Version\StorageInterface $versionStorage = null ) { $this->logger = $logger; $this->mergeStrategy = $mergeStrategy; $this->assetRepo = $assetRepo; - $this->versionStorage = $versionStorage; + $this->versionStorage = $versionStorage ?: ObjectManager::getInstance()->get( + \Magento\Framework\App\View\Deployment\Version\StorageInterface::class + ); if (!$assets) { throw new \InvalidArgumentException('At least one asset has to be passed for merging.'); @@ -127,9 +131,9 @@ private function createMergedAsset(array $assets) } $paths = array_unique($paths); - $version=$this->versionStorage->load(); + $version = $this->versionStorage->load(); if ($version) { - $paths[]=$version; + $paths[] = $version; } $filePath = md5(implode('|', $paths)) . '.' . $this->contentType; From 94e0e25d285781aa3bc7b8a02a0cc119e04fec8b Mon Sep 17 00:00:00 2001 From: Stanislav Idolov Date: Fri, 11 May 2018 09:13:44 +0300 Subject: [PATCH 27/49] Fixed unit test --- .../Magento/Framework/View/Test/Unit/Asset/MergedTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php index 2f7742f5ccbd..0e06b81068b9 100755 --- a/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php @@ -84,8 +84,8 @@ public function testConstructorNothingToMerge() new \Magento\Framework\View\Asset\Merged( $this->logger, $this->mergeStrategy, $this->assetRepo, - $this->versionStorage, - [] + [], + $this->versionStorage ); } From 831e58c2ac596592548220d111491426b433c5e0 Mon Sep 17 00:00:00 2001 From: Alex Lukyanau Date: Fri, 11 May 2018 02:24:26 -0400 Subject: [PATCH 28/49] Fixed Unit Tests --- .../Magento/Framework/View/Test/Unit/Asset/MergedTest.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php index 0e06b81068b9..8f6cb55d562d 100755 --- a/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php @@ -101,8 +101,8 @@ public function testConstructorRequireMergeInterface() 'logger' => $this->logger, 'mergeStrategy' => $this->mergeStrategy, 'assetRepo' => $this->assetRepo, - 'versionStorage' => $this->versionStorage, 'assets' => [$this->assetJsOne, $assetUrl], + 'versionStorage' => $this->versionStorage, ]); } @@ -121,8 +121,8 @@ public function testConstructorIncompatibleContentTypes() 'logger' => $this->logger, 'mergeStrategy' => $this->mergeStrategy, 'assetRepo' => $this->assetRepo, - 'versionStorage' => $this->versionStorage, 'assets' => [$this->assetJsOne, $assetCss], + 'versionStorage' => $this->versionStorage, ]); } @@ -137,8 +137,8 @@ public function testIteratorInterfaceMerge() 'logger' => $this->logger, 'mergeStrategy' => $this->mergeStrategy, 'assetRepo' => $this->assetRepo, - 'versionStorage' => $this->versionStorage, 'assets' => $assets, + 'versionStorage' => $this->versionStorage, ]); $mergedAsset = $this->createMock(\Magento\Framework\View\Asset\File::class); @@ -172,8 +172,8 @@ public function testIteratorInterfaceMergeFailure() 'logger' => $this->logger, 'mergeStrategy' => $this->mergeStrategy, 'assetRepo' => $this->assetRepo, - 'versionStorage' => $this->versionStorage, 'assets' => [$this->assetJsOne, $this->assetJsTwo, $assetBroken], + 'versionStorage' => $this->versionStorage, ]); $this->logger->expects($this->once())->method('critical')->with($this->identicalTo($mergeError)); From 742ad8c6fac09a062a4dc5c99cd2e30ecc5a251a Mon Sep 17 00:00:00 2001 From: Alex Lukyanau Date: Fri, 11 May 2018 12:29:33 -0400 Subject: [PATCH 29/49] Only one argument is allowed per line in a multi-line function call --- .../Magento/Framework/View/Test/Unit/Asset/MergedTest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php index 8f6cb55d562d..52b45a510e72 100755 --- a/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php +++ b/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php @@ -82,7 +82,8 @@ protected function setUp() public function testConstructorNothingToMerge() { new \Magento\Framework\View\Asset\Merged( - $this->logger, $this->mergeStrategy, + $this->logger, + $this->mergeStrategy, $this->assetRepo, [], $this->versionStorage From 01d5e3ee41d59429f59d1a5a2bc67cb8fff07bc6 Mon Sep 17 00:00:00 2001 From: John Stennett Date: Mon, 9 Jul 2018 18:33:24 -0500 Subject: [PATCH 30/49] MQE-1121: MSI MFTF Test Cases 4 Updates - Replacing waitForElement with waitForPageLoad. - Correcting invalid parameterized selectors. - Adding action group argument type. --- .../Mftf/ActionGroup/StorefrontProductCartActionGroup.xml | 6 +++--- .../Test/Mftf/Section/AdminShipmentItemsSection.xml | 8 ++++---- .../ActionGroup/AdminDataGridPaginationActionGroup.xml | 2 +- .../Test/Mftf/Section/AdminDataGridPaginationSection.xml | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/code/Magento/Bundle/Test/Mftf/ActionGroup/StorefrontProductCartActionGroup.xml b/app/code/Magento/Bundle/Test/Mftf/ActionGroup/StorefrontProductCartActionGroup.xml index 52846152eacd..48697d43ec82 100644 --- a/app/code/Magento/Bundle/Test/Mftf/ActionGroup/StorefrontProductCartActionGroup.xml +++ b/app/code/Magento/Bundle/Test/Mftf/ActionGroup/StorefrontProductCartActionGroup.xml @@ -16,12 +16,12 @@ - + - + - + diff --git a/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentItemsSection.xml b/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentItemsSection.xml index 7c936a7420db..30f508beb57a 100644 --- a/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentItemsSection.xml +++ b/app/code/Magento/Shipping/Test/Mftf/Section/AdminShipmentItemsSection.xml @@ -9,10 +9,10 @@
- - - - + + + +
diff --git a/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminDataGridPaginationActionGroup.xml b/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminDataGridPaginationActionGroup.xml index d05a7898872a..9239f296aafa 100644 --- a/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminDataGridPaginationActionGroup.xml +++ b/app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminDataGridPaginationActionGroup.xml @@ -10,7 +10,7 @@ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd"> - + diff --git a/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridPaginationSection.xml b/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridPaginationSection.xml index 5e4fc5298bba..ff4097aa7626 100644 --- a/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridPaginationSection.xml +++ b/app/code/Magento/Ui/Test/Mftf/Section/AdminDataGridPaginationSection.xml @@ -10,7 +10,7 @@ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
- + From 5a54f5aae2d137b1d437fec849ed02e327b9d1eb Mon Sep 17 00:00:00 2001 From: John Stennett Date: Mon, 9 Jul 2018 20:57:24 -0500 Subject: [PATCH 31/49] MQE-1267: MSI MFTF Test Cases 4 - Adding waitForPageLoad to correct a timing issue. - Adding missing website xml. --- .../ActionGroup/AdminOrderActionGroup.xml | 1 + .../Store/Test/Mftf/Metadata/website-meta.xml | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 app/code/Magento/Store/Test/Mftf/Metadata/website-meta.xml diff --git a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml index 99a3f8efeb15..7ce10d5e5424 100644 --- a/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml +++ b/app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderActionGroup.xml @@ -129,6 +129,7 @@ + diff --git a/app/code/Magento/Store/Test/Mftf/Metadata/website-meta.xml b/app/code/Magento/Store/Test/Mftf/Metadata/website-meta.xml new file mode 100644 index 000000000000..4e314396ab04 --- /dev/null +++ b/app/code/Magento/Store/Test/Mftf/Metadata/website-meta.xml @@ -0,0 +1,22 @@ + + + + + + + string + string + string + integer + + string + string + + From 7544c3d909ac83df0106b80285009ec5b481fe4d Mon Sep 17 00:00:00 2001 From: NamrataChangani Date: Thu, 5 Jul 2018 11:49:49 +0530 Subject: [PATCH 32/49] Corrected function comment --- .../src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php b/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php index 7759eb51a52a..d78e259ec06e 100644 --- a/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php +++ b/setup/src/Magento/Setup/Module/Di/Code/Reader/ClassesScanner.php @@ -117,7 +117,7 @@ private function extract(\RecursiveIteratorIterator $recursiveIterator) /** * @param array $classNames * @param string $fileItemPath - * @return bool Whether the clas is included or not + * @return bool Whether the class is included or not */ private function includeClasses(array $classNames, $fileItemPath) { From c5ac65cb5fe07ebaa6767e32fce37fe7a997a9f9 Mon Sep 17 00:00:00 2001 From: John Stennett Date: Tue, 10 Jul 2018 10:05:59 -0500 Subject: [PATCH 33/49] MQE-1121: MSI MFTF Test Cases 4 Updates - Removing section files that were in the wrong module directory. File moved to the MSI repo. - Removing _suite file that was in the wrong module directory. File moved to the MSI repo. - Updating XSD URIs. --- .../Section/AdminAdvancedInventorySection.xml | 20 ------------- .../Section/ProductStockOptionsSection.xml | 16 ----------- .../Mftf}/Section/AdminMessagesSection.xml | 2 +- .../acceptance/tests/_suite/msi-suite.xml | 28 ------------------- 4 files changed, 1 insertion(+), 65 deletions(-) delete mode 100644 app/code/Magento/CatalogInventory/Test/Mftf/Section/AdminAdvancedInventorySection.xml delete mode 100644 app/code/Magento/CatalogInventory/Test/Mftf/Section/ProductStockOptionsSection.xml rename {dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui => app/code/Magento/Ui/Test/Mftf}/Section/AdminMessagesSection.xml (69%) delete mode 100644 dev/tests/acceptance/tests/_suite/msi-suite.xml diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/Section/AdminAdvancedInventorySection.xml b/app/code/Magento/CatalogInventory/Test/Mftf/Section/AdminAdvancedInventorySection.xml deleted file mode 100644 index 0a51d778a02f..000000000000 --- a/app/code/Magento/CatalogInventory/Test/Mftf/Section/AdminAdvancedInventorySection.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - -
- -
-
- - - - -
-
diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/Section/ProductStockOptionsSection.xml b/app/code/Magento/CatalogInventory/Test/Mftf/Section/ProductStockOptionsSection.xml deleted file mode 100644 index 958d774a7641..000000000000 --- a/app/code/Magento/CatalogInventory/Test/Mftf/Section/ProductStockOptionsSection.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - -
- - - - - -
-
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/AdminMessagesSection.xml b/app/code/Magento/Ui/Test/Mftf/Section/AdminMessagesSection.xml similarity index 69% rename from dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/AdminMessagesSection.xml rename to app/code/Magento/Ui/Test/Mftf/Section/AdminMessagesSection.xml index a727104f4801..d3e94eb24dfd 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Ui/Section/AdminMessagesSection.xml +++ b/app/code/Magento/Ui/Test/Mftf/Section/AdminMessagesSection.xml @@ -7,7 +7,7 @@ --> + xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
diff --git a/dev/tests/acceptance/tests/_suite/msi-suite.xml b/dev/tests/acceptance/tests/_suite/msi-suite.xml deleted file mode 100644 index b96451d58871..000000000000 --- a/dev/tests/acceptance/tests/_suite/msi-suite.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - From a6a0d5b0c0ff76f59e4c2b138841863c0dc0654b Mon Sep 17 00:00:00 2001 From: Prince Patel Date: Tue, 10 Jul 2018 23:34:04 +0530 Subject: [PATCH 34/49] Declare module namespace --- .../Paypal/Block/Adminhtml/Billing/Agreement/View/Form.php | 2 +- .../Paypal/Block/Adminhtml/Billing/Agreement/View/Tab/Info.php | 2 +- .../Block/Adminhtml/System/Config/Payflowlink/Advanced.php | 2 +- .../Paypal/Block/Adminhtml/System/Config/Payflowlink/Info.php | 2 +- app/code/Magento/Paypal/Block/Hosted/Pro/Form.php | 2 +- app/code/Magento/Paypal/Block/Iframe.php | 2 +- app/code/Magento/Paypal/Block/Payflow/Advanced/Form.php | 2 +- app/code/Magento/Paypal/Block/Payflow/Link/Form.php | 2 +- app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php | 2 +- .../Sales/Block/Adminhtml/Order/Create/Totals/Grandtotal.php | 2 +- .../Sales/Block/Adminhtml/Order/Create/Totals/Shipping.php | 2 +- .../Sales/Block/Adminhtml/Order/Create/Totals/Subtotal.php | 2 +- .../Magento/Sales/Block/Adminhtml/Order/Create/Totals/Tax.php | 2 +- app/code/Magento/Sales/Block/Adminhtml/Order/Details.php | 2 +- app/code/Magento/Sales/Block/Adminhtml/Order/View/Form.php | 2 +- .../Magento/Sales/Block/Adminhtml/Order/View/Tab/History.php | 2 +- app/code/Magento/Sales/Block/Adminhtml/Rss/Order/Grid/Link.php | 2 +- app/code/Magento/Sales/Block/Order/Info/Buttons.php | 2 +- app/code/Magento/Sales/Block/Order/Info/Buttons/Rss.php | 2 +- app/code/Magento/Sales/Block/Order/Invoice.php | 2 +- app/code/Magento/Sales/Block/Order/View.php | 2 +- 21 files changed, 21 insertions(+), 21 deletions(-) diff --git a/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Form.php b/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Form.php index 31b3e0c1d6b6..396c66d4e748 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Form.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Form.php @@ -13,5 +13,5 @@ class Form extends \Magento\Backend\Block\Template /** * @var string */ - protected $_template = 'billing/agreement/view/form.phtml'; + protected $_template = 'Magento_Paypal::billing/agreement/view/form.phtml'; } diff --git a/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Tab/Info.php b/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Tab/Info.php index d133d19f9c20..39373017fa09 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Tab/Info.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/Billing/Agreement/View/Tab/Info.php @@ -15,7 +15,7 @@ class Info extends \Magento\Backend\Block\Template implements \Magento\Backend\B /** * @var string */ - protected $_template = 'billing/agreement/view/tab/info.phtml'; + protected $_template = 'Magento_Paypal::billing/agreement/view/tab/info.phtml'; /** * Core registry diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Payflowlink/Advanced.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Payflowlink/Advanced.php index fe4f6ee1f675..793fad152bc7 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Payflowlink/Advanced.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Payflowlink/Advanced.php @@ -16,5 +16,5 @@ class Advanced extends \Magento\Paypal\Block\Adminhtml\System\Config\Payflowlink * * @var string */ - protected $_template = 'system/config/payflowlink/advanced.phtml'; + protected $_template = 'Magento_Paypal::system/config/payflowlink/advanced.phtml'; } diff --git a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Payflowlink/Info.php b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Payflowlink/Info.php index 30119063f5b5..405de1ec0318 100644 --- a/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Payflowlink/Info.php +++ b/app/code/Magento/Paypal/Block/Adminhtml/System/Config/Payflowlink/Info.php @@ -16,7 +16,7 @@ class Info extends \Magento\Config\Block\System\Config\Form\Field * * @var string */ - protected $_template = 'system/config/payflowlink/info.phtml'; + protected $_template = 'Magento_Paypal::system/config/payflowlink/info.phtml'; /** * Render fieldset html diff --git a/app/code/Magento/Paypal/Block/Hosted/Pro/Form.php b/app/code/Magento/Paypal/Block/Hosted/Pro/Form.php index 92281d3058ee..70eff8f83ba9 100644 --- a/app/code/Magento/Paypal/Block/Hosted/Pro/Form.php +++ b/app/code/Magento/Paypal/Block/Hosted/Pro/Form.php @@ -15,5 +15,5 @@ class Form extends \Magento\Payment\Block\Form /** * @var string */ - protected $_template = 'hss/info.phtml'; + protected $_template = 'Magento_Paypal::hss/info.phtml'; } diff --git a/app/code/Magento/Paypal/Block/Iframe.php b/app/code/Magento/Paypal/Block/Iframe.php index d6edb1ed2523..98fc05d0d2f6 100644 --- a/app/code/Magento/Paypal/Block/Iframe.php +++ b/app/code/Magento/Paypal/Block/Iframe.php @@ -44,7 +44,7 @@ class Iframe extends \Magento\Payment\Block\Form /** * @var string */ - protected $_template = 'hss/js.phtml'; + protected $_template = 'Magento_Paypal::hss/js.phtml'; /** * @var \Magento\Sales\Model\OrderFactory diff --git a/app/code/Magento/Paypal/Block/Payflow/Advanced/Form.php b/app/code/Magento/Paypal/Block/Payflow/Advanced/Form.php index d777279ad47a..159abd4e2f1b 100644 --- a/app/code/Magento/Paypal/Block/Payflow/Advanced/Form.php +++ b/app/code/Magento/Paypal/Block/Payflow/Advanced/Form.php @@ -15,7 +15,7 @@ class Form extends \Magento\Paypal\Block\Payflow\Link\Form /** * @var string */ - protected $_template = 'payflowadvanced/info.phtml'; + protected $_template = 'Magento_Paypal::payflowadvanced/info.phtml'; /** * Get frame action URL diff --git a/app/code/Magento/Paypal/Block/Payflow/Link/Form.php b/app/code/Magento/Paypal/Block/Payflow/Link/Form.php index f414a63d6904..fc880f494c85 100644 --- a/app/code/Magento/Paypal/Block/Payflow/Link/Form.php +++ b/app/code/Magento/Paypal/Block/Payflow/Link/Form.php @@ -15,7 +15,7 @@ class Form extends \Magento\Payment\Block\Form /** * @var string */ - protected $_template = 'payflowlink/info.phtml'; + protected $_template = 'Magento_Paypal::payflowlink/info.phtml'; /** * Get frame action URL diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php index f2b454260dc2..6cab109b44db 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Address/Form.php @@ -19,7 +19,7 @@ class Form extends \Magento\Sales\Block\Adminhtml\Order\Create\Form\Address * * @var string */ - protected $_template = 'order/address/form.phtml'; + protected $_template = 'Magento_Sales::order/address/form.phtml'; /** * Core registry diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Grandtotal.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Grandtotal.php index eb437915ad66..cf9f8a44dee2 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Grandtotal.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Grandtotal.php @@ -20,7 +20,7 @@ class Grandtotal extends \Magento\Sales\Block\Adminhtml\Order\Create\Totals\Defa * * @var string */ - protected $_template = 'order/create/totals/grandtotal.phtml'; + protected $_template = 'Magento_Sales::order/create/totals/grandtotal.phtml'; /** * Tax config diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Shipping.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Shipping.php index 9225d8c2e5f6..34a9ed8070e2 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Shipping.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Shipping.php @@ -20,7 +20,7 @@ class Shipping extends \Magento\Sales\Block\Adminhtml\Order\Create\Totals\Defaul * * @var string */ - protected $_template = 'order/create/totals/shipping.phtml'; + protected $_template = 'Magento_Sales::order/create/totals/shipping.phtml'; /** * Tax config diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Subtotal.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Subtotal.php index cfdd73de9d8b..166f3c9637eb 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Subtotal.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Subtotal.php @@ -20,7 +20,7 @@ class Subtotal extends \Magento\Sales\Block\Adminhtml\Order\Create\Totals\Defaul * * @var string */ - protected $_template = 'order/create/totals/subtotal.phtml'; + protected $_template = 'Magento_Sales::order/create/totals/subtotal.phtml'; /** * Tax config diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Tax.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Tax.php index d3da37c3f1bf..207a4eca6021 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Tax.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Totals/Tax.php @@ -18,5 +18,5 @@ class Tax extends \Magento\Sales\Block\Adminhtml\Order\Create\Totals\DefaultTota * * @var string */ - protected $_template = 'order/create/totals/tax.phtml'; + protected $_template = 'Magento_Sales::order/create/totals/tax.phtml'; } diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Details.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Details.php index 5c3a7fce805c..261f4b0cfd12 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Details.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Details.php @@ -14,5 +14,5 @@ class Details extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'order/details.phtml'; + protected $_template = 'Magento_Sales::order/details.phtml'; } diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Form.php b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Form.php index 82c3effcab62..6c06e9d624c8 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Form.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Form.php @@ -17,5 +17,5 @@ class Form extends \Magento\Backend\Block\Template * * @var string */ - protected $_template = 'order/view/form.phtml'; + protected $_template = 'Magento_Sales::order/view/form.phtml'; } diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/History.php b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/History.php index 5489a0b2e513..64b53d10d4af 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/History.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/View/Tab/History.php @@ -18,7 +18,7 @@ class History extends \Magento\Backend\Block\Template implements \Magento\Backen * * @var string */ - protected $_template = 'order/view/tab/history.phtml'; + protected $_template = 'Magento_Sales::order/view/tab/history.phtml'; /** * Core registry diff --git a/app/code/Magento/Sales/Block/Adminhtml/Rss/Order/Grid/Link.php b/app/code/Magento/Sales/Block/Adminhtml/Rss/Order/Grid/Link.php index fbb78970a4de..512539824da2 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Rss/Order/Grid/Link.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Rss/Order/Grid/Link.php @@ -14,7 +14,7 @@ class Link extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'rss/order/grid/link.phtml'; + protected $_template = 'Magento_Sales::rss/order/grid/link.phtml'; /** * @var \Magento\Framework\App\Rss\UrlBuilderInterface diff --git a/app/code/Magento/Sales/Block/Order/Info/Buttons.php b/app/code/Magento/Sales/Block/Order/Info/Buttons.php index a27b55cd8543..18e79f6a76ec 100644 --- a/app/code/Magento/Sales/Block/Order/Info/Buttons.php +++ b/app/code/Magento/Sales/Block/Order/Info/Buttons.php @@ -20,7 +20,7 @@ class Buttons extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'order/info/buttons.phtml'; + protected $_template = 'Magento_Sales::order/info/buttons.phtml'; /** * Core registry diff --git a/app/code/Magento/Sales/Block/Order/Info/Buttons/Rss.php b/app/code/Magento/Sales/Block/Order/Info/Buttons/Rss.php index 77e20eaa8d07..2b84b8f1444b 100644 --- a/app/code/Magento/Sales/Block/Order/Info/Buttons/Rss.php +++ b/app/code/Magento/Sales/Block/Order/Info/Buttons/Rss.php @@ -16,7 +16,7 @@ class Rss extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'order/info/buttons/rss.phtml'; + protected $_template = 'Magento_Sales::order/info/buttons/rss.phtml'; /** * @var \Magento\Sales\Model\OrderFactory diff --git a/app/code/Magento/Sales/Block/Order/Invoice.php b/app/code/Magento/Sales/Block/Order/Invoice.php index 2d8448ea5bc9..24ddf4bac769 100644 --- a/app/code/Magento/Sales/Block/Order/Invoice.php +++ b/app/code/Magento/Sales/Block/Order/Invoice.php @@ -18,7 +18,7 @@ class Invoice extends \Magento\Sales\Block\Order\Invoice\Items /** * @var string */ - protected $_template = 'order/invoice.phtml'; + protected $_template = 'Magento_Sales::order/invoice.phtml'; /** * @var \Magento\Framework\App\Http\Context diff --git a/app/code/Magento/Sales/Block/Order/View.php b/app/code/Magento/Sales/Block/Order/View.php index 870e2e15ab7b..03d1340e0f69 100644 --- a/app/code/Magento/Sales/Block/Order/View.php +++ b/app/code/Magento/Sales/Block/Order/View.php @@ -18,7 +18,7 @@ class View extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'order/view.phtml'; + protected $_template = 'Magento_Sales::order/view.phtml'; /** * Core registry From e31a8c328f7b6db1d2f49cb5379528cd1c382b86 Mon Sep 17 00:00:00 2001 From: Prince Patel Date: Tue, 10 Jul 2018 23:36:07 +0530 Subject: [PATCH 35/49] Declare module namespace --- app/code/Magento/Newsletter/Block/Adminhtml/Problem.php | 2 +- app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php | 2 +- app/code/Magento/Newsletter/Block/Adminhtml/Subscriber.php | 2 +- app/code/Magento/Newsletter/Block/Adminhtml/Template.php | 2 +- app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php | 2 +- app/code/Magento/Tax/Block/Adminhtml/Rate/Title.php | 2 +- app/code/Magento/Tax/Block/Adminhtml/Rate/Toolbar/Add.php | 2 +- app/code/Magento/Tax/Block/Adminhtml/Rate/Toolbar/Save.php | 2 +- app/code/Magento/Tax/Block/Checkout/Grandtotal.php | 2 +- app/code/Magento/Tax/Block/Checkout/Shipping.php | 2 +- app/code/Magento/Tax/Block/Checkout/Subtotal.php | 2 +- app/code/Magento/Tax/Block/Checkout/Tax.php | 2 +- .../TaxImportExport/Block/Adminhtml/Rate/ImportExport.php | 2 +- .../TaxImportExport/Block/Adminhtml/Rate/ImportExportHeader.php | 2 +- .../Theme/Block/Adminhtml/Wysiwyg/Files/Content/Uploader.php | 2 +- app/code/Magento/Theme/Block/Html/Breadcrumbs.php | 2 +- app/code/Magento/Theme/Block/Html/Header.php | 2 +- app/code/Magento/Theme/Block/Html/Header/Logo.php | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Problem.php b/app/code/Magento/Newsletter/Block/Adminhtml/Problem.php index c5f4dc68d4dd..61a17d7ad5e5 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Problem.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Problem.php @@ -19,7 +19,7 @@ class Problem extends \Magento\Backend\Block\Template /** * @var string */ - protected $_template = 'problem/list.phtml'; + protected $_template = 'Magento_Newsletter::problem/list.phtml'; /** * @var \Magento\Newsletter\Model\ResourceModel\Problem\Collection diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php index f085b0f6c9c8..ca90b5d84a10 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Queue/Edit.php @@ -19,7 +19,7 @@ class Edit extends \Magento\Backend\Block\Template /** * @var string */ - protected $_template = 'queue/edit.phtml'; + protected $_template = 'Magento_Newsletter::queue/edit.phtml'; /** * Core registry diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber.php b/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber.php index 86e7e7ee4756..4d5165db6873 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Subscriber.php @@ -29,7 +29,7 @@ class Subscriber extends \Magento\Backend\Block\Template /** * @var string */ - protected $_template = 'subscriber/list.phtml'; + protected $_template = 'Magento_Newsletter::subscriber/list.phtml'; /** * @var \Magento\Newsletter\Model\ResourceModel\Queue\CollectionFactory diff --git a/app/code/Magento/Newsletter/Block/Adminhtml/Template.php b/app/code/Magento/Newsletter/Block/Adminhtml/Template.php index 02b60e049f25..92ae6e6c3db0 100644 --- a/app/code/Magento/Newsletter/Block/Adminhtml/Template.php +++ b/app/code/Magento/Newsletter/Block/Adminhtml/Template.php @@ -16,7 +16,7 @@ class Template extends \Magento\Backend\Block\Template /** * @var string */ - protected $_template = 'template/list.phtml'; + protected $_template = 'Magento_Newsletter::template/list.phtml'; /** * @return $this diff --git a/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php b/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php index 96fc9a40d53d..450203486f36 100644 --- a/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php +++ b/app/code/Magento/Tax/Block/Adminhtml/Rate/Form.php @@ -31,7 +31,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic /** * @var string */ - protected $_template = 'rate/form.phtml'; + protected $_template = 'Magento_Tax::rate/form.phtml'; /** * Tax data diff --git a/app/code/Magento/Tax/Block/Adminhtml/Rate/Title.php b/app/code/Magento/Tax/Block/Adminhtml/Rate/Title.php index e1e866c06571..9612b57f8d5d 100644 --- a/app/code/Magento/Tax/Block/Adminhtml/Rate/Title.php +++ b/app/code/Magento/Tax/Block/Adminhtml/Rate/Title.php @@ -23,7 +23,7 @@ class Title extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'rate/title.phtml'; + protected $_template = 'Magento_Tax::rate/title.phtml'; /** * @var \Magento\Store\Model\StoreFactory diff --git a/app/code/Magento/Tax/Block/Adminhtml/Rate/Toolbar/Add.php b/app/code/Magento/Tax/Block/Adminhtml/Rate/Toolbar/Add.php index 9cf96bc21e96..16d828542c5b 100644 --- a/app/code/Magento/Tax/Block/Adminhtml/Rate/Toolbar/Add.php +++ b/app/code/Magento/Tax/Block/Adminhtml/Rate/Toolbar/Add.php @@ -20,7 +20,7 @@ class Add extends \Magento\Backend\Block\Template implements \Magento\Backend\Bl /** * @var string */ - protected $_template = 'toolbar/rate/add.phtml'; + protected $_template = 'Magento_Tax::toolbar/rate/add.phtml'; /** * @var \Magento\Backend\Block\Widget\Button\ButtonList diff --git a/app/code/Magento/Tax/Block/Adminhtml/Rate/Toolbar/Save.php b/app/code/Magento/Tax/Block/Adminhtml/Rate/Toolbar/Save.php index 19c5fab72ac4..4eaaa3be8a8f 100644 --- a/app/code/Magento/Tax/Block/Adminhtml/Rate/Toolbar/Save.php +++ b/app/code/Magento/Tax/Block/Adminhtml/Rate/Toolbar/Save.php @@ -16,7 +16,7 @@ class Save extends \Magento\Backend\Block\Template implements \Magento\Backend\B /** * @var string */ - protected $_template = 'toolbar/rate/save.phtml'; + protected $_template = 'Magento_Tax::toolbar/rate/save.phtml'; /** * @var \Magento\Backend\Block\Widget\Button\ButtonList diff --git a/app/code/Magento/Tax/Block/Checkout/Grandtotal.php b/app/code/Magento/Tax/Block/Checkout/Grandtotal.php index 68de4cb24a48..77af1ad99ea2 100644 --- a/app/code/Magento/Tax/Block/Checkout/Grandtotal.php +++ b/app/code/Magento/Tax/Block/Checkout/Grandtotal.php @@ -15,7 +15,7 @@ class Grandtotal extends \Magento\Checkout\Block\Total\DefaultTotal * * @var string */ - protected $_template = 'checkout/grandtotal.phtml'; + protected $_template = 'Magento_Tax::checkout/grandtotal.phtml'; /** * @var \Magento\Tax\Model\Config diff --git a/app/code/Magento/Tax/Block/Checkout/Shipping.php b/app/code/Magento/Tax/Block/Checkout/Shipping.php index e9098035053b..299c586fd224 100644 --- a/app/code/Magento/Tax/Block/Checkout/Shipping.php +++ b/app/code/Magento/Tax/Block/Checkout/Shipping.php @@ -15,7 +15,7 @@ class Shipping extends \Magento\Checkout\Block\Total\DefaultTotal * * @var string */ - protected $_template = 'checkout/shipping.phtml'; + protected $_template = 'Magento_Tax::checkout/shipping.phtml'; /** * @var \Magento\Tax\Model\Config diff --git a/app/code/Magento/Tax/Block/Checkout/Subtotal.php b/app/code/Magento/Tax/Block/Checkout/Subtotal.php index 7a9059df08ba..22da07954159 100644 --- a/app/code/Magento/Tax/Block/Checkout/Subtotal.php +++ b/app/code/Magento/Tax/Block/Checkout/Subtotal.php @@ -15,7 +15,7 @@ class Subtotal extends \Magento\Checkout\Block\Total\DefaultTotal * * @var string */ - protected $_template = 'checkout/subtotal.phtml'; + protected $_template = 'Magento_Tax::checkout/subtotal.phtml'; /** * @var \Magento\Tax\Model\Config diff --git a/app/code/Magento/Tax/Block/Checkout/Tax.php b/app/code/Magento/Tax/Block/Checkout/Tax.php index f741e64019de..0a86c0312ab1 100644 --- a/app/code/Magento/Tax/Block/Checkout/Tax.php +++ b/app/code/Magento/Tax/Block/Checkout/Tax.php @@ -14,5 +14,5 @@ class Tax extends \Magento\Checkout\Block\Total\DefaultTotal /** * @var string */ - protected $_template = 'checkout/tax.phtml'; + protected $_template = 'Magento_Tax::checkout/tax.phtml'; } diff --git a/app/code/Magento/TaxImportExport/Block/Adminhtml/Rate/ImportExport.php b/app/code/Magento/TaxImportExport/Block/Adminhtml/Rate/ImportExport.php index a42877b3ecf8..ab64567f4fe2 100644 --- a/app/code/Magento/TaxImportExport/Block/Adminhtml/Rate/ImportExport.php +++ b/app/code/Magento/TaxImportExport/Block/Adminhtml/Rate/ImportExport.php @@ -14,7 +14,7 @@ class ImportExport extends \Magento\Backend\Block\Widget /** * @var string */ - protected $_template = 'importExport.phtml'; + protected $_template = 'Magento_TaxImportExport::importExport.phtml'; /** * @param \Magento\Backend\Block\Template\Context $context diff --git a/app/code/Magento/TaxImportExport/Block/Adminhtml/Rate/ImportExportHeader.php b/app/code/Magento/TaxImportExport/Block/Adminhtml/Rate/ImportExportHeader.php index 8897e9b2083e..e223adc3adb1 100644 --- a/app/code/Magento/TaxImportExport/Block/Adminhtml/Rate/ImportExportHeader.php +++ b/app/code/Magento/TaxImportExport/Block/Adminhtml/Rate/ImportExportHeader.php @@ -16,5 +16,5 @@ class ImportExportHeader extends \Magento\Backend\Block\Widget * * @var string */ - protected $_template = 'importExportHeader.phtml'; + protected $_template = 'Magento_TaxImportExport::importExportHeader.phtml'; } diff --git a/app/code/Magento/Theme/Block/Adminhtml/Wysiwyg/Files/Content/Uploader.php b/app/code/Magento/Theme/Block/Adminhtml/Wysiwyg/Files/Content/Uploader.php index 8e7f4c9cc680..e99500dbd069 100644 --- a/app/code/Magento/Theme/Block/Adminhtml/Wysiwyg/Files/Content/Uploader.php +++ b/app/code/Magento/Theme/Block/Adminhtml/Wysiwyg/Files/Content/Uploader.php @@ -19,7 +19,7 @@ class Uploader extends \Magento\Backend\Block\Media\Uploader * * @var string */ - protected $_template = 'browser/content/uploader.phtml'; + protected $_template = 'Magento_Theme::browser/content/uploader.phtml'; /** * @var \Magento\Theme\Helper\Storage diff --git a/app/code/Magento/Theme/Block/Html/Breadcrumbs.php b/app/code/Magento/Theme/Block/Html/Breadcrumbs.php index c1f8ea620ef4..cff87fc8726b 100644 --- a/app/code/Magento/Theme/Block/Html/Breadcrumbs.php +++ b/app/code/Magento/Theme/Block/Html/Breadcrumbs.php @@ -21,7 +21,7 @@ class Breadcrumbs extends \Magento\Framework\View\Element\Template * * @var string */ - protected $_template = 'html/breadcrumbs.phtml'; + protected $_template = 'Magento_Theme::html/breadcrumbs.phtml'; /** * List of available breadcrumb properties diff --git a/app/code/Magento/Theme/Block/Html/Header.php b/app/code/Magento/Theme/Block/Html/Header.php index f597b4034da9..2663a4da1501 100644 --- a/app/code/Magento/Theme/Block/Html/Header.php +++ b/app/code/Magento/Theme/Block/Html/Header.php @@ -19,7 +19,7 @@ class Header extends \Magento\Framework\View\Element\Template * * @var string */ - protected $_template = 'html/header.phtml'; + protected $_template = 'Magento_Theme::html/header.phtml'; /** * Retrieve welcome text diff --git a/app/code/Magento/Theme/Block/Html/Header/Logo.php b/app/code/Magento/Theme/Block/Html/Header/Logo.php index 5b0c2eaf04c4..0a0e71f44ba3 100644 --- a/app/code/Magento/Theme/Block/Html/Header/Logo.php +++ b/app/code/Magento/Theme/Block/Html/Header/Logo.php @@ -19,7 +19,7 @@ class Logo extends \Magento\Framework\View\Element\Template * * @var string */ - protected $_template = 'html/header/logo.phtml'; + protected $_template = 'Magento_Theme::html/header/logo.phtml'; /** * @var \Magento\MediaStorage\Helper\File\Storage\Database From b798f31e23dece815a9d88342a2486b321e1b0b6 Mon Sep 17 00:00:00 2001 From: Prince Patel Date: Tue, 10 Jul 2018 23:37:52 +0530 Subject: [PATCH 36/49] Declare module namespace --- app/code/Magento/AdvancedSearch/Block/SearchData.php | 2 +- .../Adminhtml/Product/Attribute/Set/Main/Tree/Attribute.php | 2 +- app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Js.php | 2 +- app/code/Magento/OfflinePayments/Block/Form/Banktransfer.php | 2 +- app/code/Magento/OfflinePayments/Block/Form/Cashondelivery.php | 2 +- app/code/Magento/Payment/Block/Info/Instructions.php | 2 +- app/code/Magento/ProductAlert/Block/Email/Price.php | 2 +- app/code/Magento/ProductAlert/Block/Email/Stock.php | 2 +- app/code/Magento/Rss/Block/Feeds.php | 2 +- .../Magento/Shipping/Block/Adminhtml/Order/Packaging/Grid.php | 2 +- app/code/Magento/Shipping/Block/Order/Shipment.php | 2 +- app/code/Magento/Signifyd/Block/Fingerprint.php | 2 +- app/code/Magento/UrlRewrite/Block/Catalog/Category/Tree.php | 2 +- app/code/Magento/UrlRewrite/Block/Selector.php | 2 +- app/code/Magento/User/Block/Role/Tab/Edit.php | 2 +- app/code/Magento/Weee/Block/Renderer/Weee/Tax.php | 2 +- .../Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php | 2 +- app/code/Magento/Wishlist/Block/Rss/EmailLink.php | 2 +- app/code/Magento/Wishlist/Block/Share/Email/Items.php | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/app/code/Magento/AdvancedSearch/Block/SearchData.php b/app/code/Magento/AdvancedSearch/Block/SearchData.php index 993731b46525..105a1c1c4fc4 100644 --- a/app/code/Magento/AdvancedSearch/Block/SearchData.php +++ b/app/code/Magento/AdvancedSearch/Block/SearchData.php @@ -30,7 +30,7 @@ abstract class SearchData extends Template implements SearchDataInterface /** * @var string */ - protected $_template = 'search_data.phtml'; + protected $_template = 'Magento_AdvancedSearch::search_data.phtml'; /** * @param Template\Context $context diff --git a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Tree/Attribute.php b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Tree/Attribute.php index f5e3f9441868..cb0a739b56e4 100644 --- a/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Tree/Attribute.php +++ b/app/code/Magento/Catalog/Block/Adminhtml/Product/Attribute/Set/Main/Tree/Attribute.php @@ -14,5 +14,5 @@ class Attribute extends \Magento\Backend\Block\Template /** * @var string */ - protected $_template = 'catalog/product/attribute/set/main/tree/attribute.phtml'; + protected $_template = 'Magento_Catalog::catalog/product/attribute/set/main/tree/attribute.phtml'; } diff --git a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Js.php b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Js.php index 8ac79a0aa0d4..7dd6b0a19ec0 100644 --- a/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Js.php +++ b/app/code/Magento/Eav/Block/Adminhtml/Attribute/Edit/Js.php @@ -18,7 +18,7 @@ class Js extends \Magento\Backend\Block\Template * @var string */ - protected $_template = 'attribute/edit/js.phtml'; + protected $_template = 'Magento_Eav::attribute/edit/js.phtml'; /** * @var \Magento\Eav\Model\Adminhtml\System\Config\Source\Inputtype diff --git a/app/code/Magento/OfflinePayments/Block/Form/Banktransfer.php b/app/code/Magento/OfflinePayments/Block/Form/Banktransfer.php index c4fe10c38664..d60348d9dc1c 100644 --- a/app/code/Magento/OfflinePayments/Block/Form/Banktransfer.php +++ b/app/code/Magento/OfflinePayments/Block/Form/Banktransfer.php @@ -15,5 +15,5 @@ class Banktransfer extends \Magento\OfflinePayments\Block\Form\AbstractInstructi * * @var string */ - protected $_template = 'form/banktransfer.phtml'; + protected $_template = 'Magento_OfflinePayments::form/banktransfer.phtml'; } diff --git a/app/code/Magento/OfflinePayments/Block/Form/Cashondelivery.php b/app/code/Magento/OfflinePayments/Block/Form/Cashondelivery.php index 4e0f7d48ce09..de0f7a57bae6 100644 --- a/app/code/Magento/OfflinePayments/Block/Form/Cashondelivery.php +++ b/app/code/Magento/OfflinePayments/Block/Form/Cashondelivery.php @@ -15,5 +15,5 @@ class Cashondelivery extends \Magento\OfflinePayments\Block\Form\AbstractInstruc * * @var string */ - protected $_template = 'form/cashondelivery.phtml'; + protected $_template = 'Magento_OfflinePayments::form/cashondelivery.phtml'; } diff --git a/app/code/Magento/Payment/Block/Info/Instructions.php b/app/code/Magento/Payment/Block/Info/Instructions.php index e3c74e020f8f..687c6b54a2f4 100644 --- a/app/code/Magento/Payment/Block/Info/Instructions.php +++ b/app/code/Magento/Payment/Block/Info/Instructions.php @@ -23,7 +23,7 @@ class Instructions extends \Magento\Payment\Block\Info /** * @var string */ - protected $_template = 'info/instructions.phtml'; + protected $_template = 'Magento_Payment::info/instructions.phtml'; /** * Get instructions text from order payment diff --git a/app/code/Magento/ProductAlert/Block/Email/Price.php b/app/code/Magento/ProductAlert/Block/Email/Price.php index 982b0f7f6337..0430a21dc8bf 100644 --- a/app/code/Magento/ProductAlert/Block/Email/Price.php +++ b/app/code/Magento/ProductAlert/Block/Email/Price.php @@ -15,7 +15,7 @@ class Price extends \Magento\ProductAlert\Block\Email\AbstractEmail /** * @var string */ - protected $_template = 'email/price.phtml'; + protected $_template = 'Magento_ProductAlert::email/price.phtml'; /** * Retrieve unsubscribe url for product diff --git a/app/code/Magento/ProductAlert/Block/Email/Stock.php b/app/code/Magento/ProductAlert/Block/Email/Stock.php index f424e7d7125c..d01960b8eb85 100644 --- a/app/code/Magento/ProductAlert/Block/Email/Stock.php +++ b/app/code/Magento/ProductAlert/Block/Email/Stock.php @@ -15,7 +15,7 @@ class Stock extends \Magento\ProductAlert\Block\Email\AbstractEmail /** * @var string */ - protected $_template = 'email/stock.phtml'; + protected $_template = 'Magento_ProductAlert::email/stock.phtml'; /** * Retrieve unsubscribe url for product diff --git a/app/code/Magento/Rss/Block/Feeds.php b/app/code/Magento/Rss/Block/Feeds.php index 2e88d25c0289..86998f87f5c1 100644 --- a/app/code/Magento/Rss/Block/Feeds.php +++ b/app/code/Magento/Rss/Block/Feeds.php @@ -16,7 +16,7 @@ class Feeds extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'feeds.phtml'; + protected $_template = 'Magento_Rss::feeds.phtml'; /** * @var \Magento\Framework\App\Rss\RssManagerInterface diff --git a/app/code/Magento/Shipping/Block/Adminhtml/Order/Packaging/Grid.php b/app/code/Magento/Shipping/Block/Adminhtml/Order/Packaging/Grid.php index 9e340cc31ff1..1d3f6ad1ee5a 100644 --- a/app/code/Magento/Shipping/Block/Adminhtml/Order/Packaging/Grid.php +++ b/app/code/Magento/Shipping/Block/Adminhtml/Order/Packaging/Grid.php @@ -10,7 +10,7 @@ class Grid extends \Magento\Backend\Block\Template /** * @var string */ - protected $_template = 'order/packaging/grid.phtml'; + protected $_template = 'Magento_Shipping::order/packaging/grid.phtml'; /** * Core registry diff --git a/app/code/Magento/Shipping/Block/Order/Shipment.php b/app/code/Magento/Shipping/Block/Order/Shipment.php index 653fb357f0b1..21e960985d6b 100644 --- a/app/code/Magento/Shipping/Block/Order/Shipment.php +++ b/app/code/Magento/Shipping/Block/Order/Shipment.php @@ -18,7 +18,7 @@ class Shipment extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'order/shipment.phtml'; + protected $_template = 'Magento_Shipping::order/shipment.phtml'; /** * Core registry diff --git a/app/code/Magento/Signifyd/Block/Fingerprint.php b/app/code/Magento/Signifyd/Block/Fingerprint.php index db76fc6c9446..f43bffce1fc1 100644 --- a/app/code/Magento/Signifyd/Block/Fingerprint.php +++ b/app/code/Magento/Signifyd/Block/Fingerprint.php @@ -42,7 +42,7 @@ class Fingerprint extends Template * @var string * @since 100.2.0 */ - protected $_template = 'fingerprint.phtml'; + protected $_template = 'Magento_Signifyd::fingerprint.phtml'; /** * @param Context $context diff --git a/app/code/Magento/UrlRewrite/Block/Catalog/Category/Tree.php b/app/code/Magento/UrlRewrite/Block/Catalog/Category/Tree.php index 64a775b01593..e34d4773c271 100644 --- a/app/code/Magento/UrlRewrite/Block/Catalog/Category/Tree.php +++ b/app/code/Magento/UrlRewrite/Block/Catalog/Category/Tree.php @@ -27,7 +27,7 @@ class Tree extends \Magento\Catalog\Block\Adminhtml\Category\AbstractCategory /** * @var string */ - protected $_template = 'categories.phtml'; + protected $_template = 'Magento_UrlRewrite::categories.phtml'; /** * Adminhtml data diff --git a/app/code/Magento/UrlRewrite/Block/Selector.php b/app/code/Magento/UrlRewrite/Block/Selector.php index 0a28ba215de5..75266fd2f977 100644 --- a/app/code/Magento/UrlRewrite/Block/Selector.php +++ b/app/code/Magento/UrlRewrite/Block/Selector.php @@ -18,7 +18,7 @@ class Selector extends \Magento\Backend\Block\Template /** * @var string */ - protected $_template = 'selector.phtml'; + protected $_template = 'Magento_UrlRewrite::selector.phtml'; /** * Set block template and get available modes diff --git a/app/code/Magento/User/Block/Role/Tab/Edit.php b/app/code/Magento/User/Block/Role/Tab/Edit.php index 45d725c61bd5..5fe6a1b2a2e8 100644 --- a/app/code/Magento/User/Block/Role/Tab/Edit.php +++ b/app/code/Magento/User/Block/Role/Tab/Edit.php @@ -19,7 +19,7 @@ class Edit extends \Magento\Backend\Block\Widget\Form implements \Magento\Backen /** * @var string */ - protected $_template = 'role/edit.phtml'; + protected $_template = 'Magento_User::role/edit.phtml'; /** * Root ACL Resource diff --git a/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php b/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php index ab6710fddcac..94a6faf72aa9 100644 --- a/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php +++ b/app/code/Magento/Weee/Block/Renderer/Weee/Tax.php @@ -32,7 +32,7 @@ class Tax extends \Magento\Backend\Block\Widget implements /** * @var string */ - protected $_template = 'renderer/tax.phtml'; + protected $_template = 'Magento_Weee::renderer/tax.phtml'; /** * Core registry diff --git a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php index 49345f29afd5..c48bf9e7e4c7 100644 --- a/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php +++ b/app/code/Magento/Widget/Block/Adminhtml/Widget/Instance/Edit/Tab/Main/Layout.php @@ -27,7 +27,7 @@ class Layout extends Template implements RendererInterface /** * @var string */ - protected $_template = 'instance/edit/layout.phtml'; + protected $_template = 'Magento_Widget::instance/edit/layout.phtml'; /** * @var \Magento\Catalog\Model\Product\Type diff --git a/app/code/Magento/Wishlist/Block/Rss/EmailLink.php b/app/code/Magento/Wishlist/Block/Rss/EmailLink.php index 4a5f116cd829..907dfd90e752 100644 --- a/app/code/Magento/Wishlist/Block/Rss/EmailLink.php +++ b/app/code/Magento/Wishlist/Block/Rss/EmailLink.php @@ -21,7 +21,7 @@ class EmailLink extends Link /** * @var string */ - protected $_template = 'rss/email.phtml'; + protected $_template = 'Magento_Wishlist::rss/email.phtml'; /** * @return array diff --git a/app/code/Magento/Wishlist/Block/Share/Email/Items.php b/app/code/Magento/Wishlist/Block/Share/Email/Items.php index bc84f6a43df3..d4e6587fd651 100644 --- a/app/code/Magento/Wishlist/Block/Share/Email/Items.php +++ b/app/code/Magento/Wishlist/Block/Share/Email/Items.php @@ -20,7 +20,7 @@ class Items extends \Magento\Wishlist\Block\AbstractBlock /** * @var string */ - protected $_template = 'email/items.phtml'; + protected $_template = 'Magento_Wishlist::email/items.phtml'; /** * Retrieve Product View URL From f30b65eae635a3f09364085833c2d6dda207981c Mon Sep 17 00:00:00 2001 From: Prince Patel Date: Wed, 11 Jul 2018 00:01:29 +0530 Subject: [PATCH 37/49] Declare module namespace --- app/code/Magento/Reports/Block/Adminhtml/Product/Viewed.php | 2 +- app/code/Magento/Reports/Block/Adminhtml/Sales/Bestsellers.php | 2 +- app/code/Magento/Reports/Block/Adminhtml/Sales/Coupons.php | 2 +- app/code/Magento/Reports/Block/Adminhtml/Sales/Invoiced.php | 2 +- app/code/Magento/Reports/Block/Adminhtml/Sales/Refunded.php | 2 +- app/code/Magento/Reports/Block/Adminhtml/Sales/Sales.php | 2 +- app/code/Magento/Reports/Block/Adminhtml/Sales/Shipping.php | 2 +- app/code/Magento/Reports/Block/Adminhtml/Sales/Tax.php | 2 +- app/code/Magento/Reports/Block/Adminhtml/Wishlist.php | 2 +- .../Magento/Review/Block/Adminhtml/Rating/Edit/Tab/Form.php | 2 +- app/code/Magento/Review/Block/Adminhtml/Rss/Grid/Link.php | 2 +- app/code/Magento/Review/Block/Customer/Recent.php | 2 +- app/code/Magento/Review/Block/Customer/View.php | 2 +- app/code/Magento/Review/Block/Rating/Entity/Detailed.php | 2 +- app/code/Magento/Review/Block/View.php | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/app/code/Magento/Reports/Block/Adminhtml/Product/Viewed.php b/app/code/Magento/Reports/Block/Adminhtml/Product/Viewed.php index fc4cffbdca40..f901b32d8b12 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Product/Viewed.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Product/Viewed.php @@ -17,7 +17,7 @@ class Viewed extends \Magento\Backend\Block\Widget\Grid\Container /** * @var string */ - protected $_template = 'report/grid/container.phtml'; + protected $_template = 'Magento_Reports::report/grid/container.phtml'; /** * @return void diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Bestsellers.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Bestsellers.php index d70930d2395a..b773184408a7 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Bestsellers.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Bestsellers.php @@ -19,7 +19,7 @@ class Bestsellers extends \Magento\Backend\Block\Widget\Grid\Container * * @var string */ - protected $_template = 'report/grid/container.phtml'; + protected $_template = 'Magento_Reports::report/grid/container.phtml'; /** * {@inheritdoc} diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Coupons.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Coupons.php index b8f71158877b..fe85af58b34f 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Coupons.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Coupons.php @@ -19,7 +19,7 @@ class Coupons extends \Magento\Backend\Block\Widget\Grid\Container * * @var string */ - protected $_template = 'report/grid/container.phtml'; + protected $_template = 'Magento_Reports::report/grid/container.phtml'; /** * {@inheritdoc} diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Invoiced.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Invoiced.php index c96483e33ebe..57594a11bd99 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Invoiced.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Invoiced.php @@ -19,7 +19,7 @@ class Invoiced extends \Magento\Backend\Block\Widget\Grid\Container * * @var string */ - protected $_template = 'report/grid/container.phtml'; + protected $_template = 'Magento_Reports::report/grid/container.phtml'; /** * {@inheritdoc} diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Refunded.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Refunded.php index 7ff80f62f6be..994b29e6eb0d 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Refunded.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Refunded.php @@ -19,7 +19,7 @@ class Refunded extends \Magento\Backend\Block\Widget\Grid\Container * * @var string */ - protected $_template = 'report/grid/container.phtml'; + protected $_template = 'Magento_Reports::report/grid/container.phtml'; /** * {@inheritdoc} diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Sales.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Sales.php index 5abea45e657d..64375ace3e94 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Sales.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Sales.php @@ -19,7 +19,7 @@ class Sales extends \Magento\Backend\Block\Widget\Grid\Container * * @var string */ - protected $_template = 'report/grid/container.phtml'; + protected $_template = 'Magento_Reports::report/grid/container.phtml'; /** * {@inheritdoc} diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Shipping.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Shipping.php index 44dd4521c7bb..e4dbdc273774 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Shipping.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Shipping.php @@ -19,7 +19,7 @@ class Shipping extends \Magento\Backend\Block\Widget\Grid\Container * * @var string */ - protected $_template = 'report/grid/container.phtml'; + protected $_template = 'Magento_Reports::report/grid/container.phtml'; /** * {@inheritdoc} diff --git a/app/code/Magento/Reports/Block/Adminhtml/Sales/Tax.php b/app/code/Magento/Reports/Block/Adminhtml/Sales/Tax.php index 38de08314d25..fa9e63745a87 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Sales/Tax.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Sales/Tax.php @@ -19,7 +19,7 @@ class Tax extends \Magento\Backend\Block\Widget\Grid\Container * * @var string */ - protected $_template = 'report/grid/container.phtml'; + protected $_template = 'Magento_Reports::report/grid/container.phtml'; /** * {@inheritdoc} diff --git a/app/code/Magento/Reports/Block/Adminhtml/Wishlist.php b/app/code/Magento/Reports/Block/Adminhtml/Wishlist.php index 28f2011de336..1ca76cb1cf95 100644 --- a/app/code/Magento/Reports/Block/Adminhtml/Wishlist.php +++ b/app/code/Magento/Reports/Block/Adminhtml/Wishlist.php @@ -18,7 +18,7 @@ class Wishlist extends \Magento\Backend\Block\Template * * @var string */ - protected $_template = 'report/wishlist.phtml'; + protected $_template = 'Magento_Reports::report/wishlist.phtml'; /** * Reports wishlist collection factory diff --git a/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tab/Form.php b/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tab/Form.php index 084138825290..dbf0a79bc42f 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tab/Form.php +++ b/app/code/Magento/Review/Block/Adminhtml/Rating/Edit/Tab/Form.php @@ -17,7 +17,7 @@ class Form extends \Magento\Backend\Block\Widget\Form\Generic /** * @var string */ - protected $_template = 'rating/form.phtml'; + protected $_template = 'Magento_Review::rating/form.phtml'; /** * Session diff --git a/app/code/Magento/Review/Block/Adminhtml/Rss/Grid/Link.php b/app/code/Magento/Review/Block/Adminhtml/Rss/Grid/Link.php index 5d2ec9fc186c..def0e896fc95 100644 --- a/app/code/Magento/Review/Block/Adminhtml/Rss/Grid/Link.php +++ b/app/code/Magento/Review/Block/Adminhtml/Rss/Grid/Link.php @@ -16,7 +16,7 @@ class Link extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'rss/grid/link.phtml'; + protected $_template = 'Magento_Review::rss/grid/link.phtml'; /** * @var \Magento\Framework\App\Rss\UrlBuilderInterface diff --git a/app/code/Magento/Review/Block/Customer/Recent.php b/app/code/Magento/Review/Block/Customer/Recent.php index 8f593f569581..5c7f1ec2c0da 100644 --- a/app/code/Magento/Review/Block/Customer/Recent.php +++ b/app/code/Magento/Review/Block/Customer/Recent.php @@ -20,7 +20,7 @@ class Recent extends \Magento\Framework\View\Element\Template * * @var string */ - protected $_template = 'customer/list.phtml'; + protected $_template = 'Magento_Review::customer/list.phtml'; /** * Product reviews collection diff --git a/app/code/Magento/Review/Block/Customer/View.php b/app/code/Magento/Review/Block/Customer/View.php index b7dfd4b969a9..237b972f1657 100644 --- a/app/code/Magento/Review/Block/Customer/View.php +++ b/app/code/Magento/Review/Block/Customer/View.php @@ -23,7 +23,7 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct * * @var string */ - protected $_template = 'customer/view.phtml'; + protected $_template = 'Magento_Review::customer/view.phtml'; /** * Catalog product model diff --git a/app/code/Magento/Review/Block/Rating/Entity/Detailed.php b/app/code/Magento/Review/Block/Rating/Entity/Detailed.php index de871d906142..0ce4f436ae70 100644 --- a/app/code/Magento/Review/Block/Rating/Entity/Detailed.php +++ b/app/code/Magento/Review/Block/Rating/Entity/Detailed.php @@ -15,7 +15,7 @@ class Detailed extends \Magento\Framework\View\Element\Template /** * @var string */ - protected $_template = 'detailed.phtml'; + protected $_template = 'Magento_Review::detailed.phtml'; /** * @var \Magento\Review\Model\RatingFactory diff --git a/app/code/Magento/Review/Block/View.php b/app/code/Magento/Review/Block/View.php index e2d035567168..95b7176b48c4 100644 --- a/app/code/Magento/Review/Block/View.php +++ b/app/code/Magento/Review/Block/View.php @@ -19,7 +19,7 @@ class View extends \Magento\Catalog\Block\Product\AbstractProduct * * @var string */ - protected $_template = 'view.phtml'; + protected $_template = 'Magento_Review::view.phtml'; /** * Rating option model From c37b82826c094216e6b456e2f47cd0c45c890323 Mon Sep 17 00:00:00 2001 From: Alex Kolesnyk Date: Tue, 10 Jul 2018 13:41:05 -0500 Subject: [PATCH 38/49] ENGCOM-2197: [Jenkins] Failure to generate MFTF Tests --- .../DisplayOutOfStockProductActionGroup.xml | 29 ------------------- .../Mftf/Page/InventoryConfigurationPage.xml | 12 -------- .../Section/AdminAdvancedInventorySection.xml | 20 ------------- .../Test/Mftf/Section/InventorySection.xml | 15 ---------- .../Section/ProductStockOptionsSection.xml | 16 ---------- .../AdminProductFormConfigurationsSection.xml | 9 +----- 6 files changed, 1 insertion(+), 100 deletions(-) delete mode 100644 app/code/Magento/CatalogInventory/Test/Mftf/ActionGroup/DisplayOutOfStockProductActionGroup.xml delete mode 100644 app/code/Magento/CatalogInventory/Test/Mftf/Page/InventoryConfigurationPage.xml delete mode 100644 app/code/Magento/CatalogInventory/Test/Mftf/Section/AdminAdvancedInventorySection.xml delete mode 100644 app/code/Magento/CatalogInventory/Test/Mftf/Section/InventorySection.xml delete mode 100644 app/code/Magento/CatalogInventory/Test/Mftf/Section/ProductStockOptionsSection.xml diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/ActionGroup/DisplayOutOfStockProductActionGroup.xml b/app/code/Magento/CatalogInventory/Test/Mftf/ActionGroup/DisplayOutOfStockProductActionGroup.xml deleted file mode 100644 index 1bec4cc99c0e..000000000000 --- a/app/code/Magento/CatalogInventory/Test/Mftf/ActionGroup/DisplayOutOfStockProductActionGroup.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/Page/InventoryConfigurationPage.xml b/app/code/Magento/CatalogInventory/Test/Mftf/Page/InventoryConfigurationPage.xml deleted file mode 100644 index 95e873a3b164..000000000000 --- a/app/code/Magento/CatalogInventory/Test/Mftf/Page/InventoryConfigurationPage.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - -
- - diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/Section/AdminAdvancedInventorySection.xml b/app/code/Magento/CatalogInventory/Test/Mftf/Section/AdminAdvancedInventorySection.xml deleted file mode 100644 index 0a51d778a02f..000000000000 --- a/app/code/Magento/CatalogInventory/Test/Mftf/Section/AdminAdvancedInventorySection.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - -
- -
-
- - - - -
-
diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/Section/InventorySection.xml b/app/code/Magento/CatalogInventory/Test/Mftf/Section/InventorySection.xml deleted file mode 100644 index 55fbc84ead96..000000000000 --- a/app/code/Magento/CatalogInventory/Test/Mftf/Section/InventorySection.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - -
- - - - -
-
diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/Section/ProductStockOptionsSection.xml b/app/code/Magento/CatalogInventory/Test/Mftf/Section/ProductStockOptionsSection.xml deleted file mode 100644 index 958d774a7641..000000000000 --- a/app/code/Magento/CatalogInventory/Test/Mftf/Section/ProductStockOptionsSection.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - -
- - - - - -
-
diff --git a/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminProductFormConfigurationsSection.xml b/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminProductFormConfigurationsSection.xml index 2080908cb2d9..007908694841 100644 --- a/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminProductFormConfigurationsSection.xml +++ b/app/code/Magento/ConfigurableProduct/Test/Mftf/Section/AdminProductFormConfigurationsSection.xml @@ -25,19 +25,12 @@
- +
-
- - - - - -
From 20cc5ac8342eee13f0cf45fc0ed170deda8f4ebd Mon Sep 17 00:00:00 2001 From: Bohdan Korablov Date: Wed, 11 Jul 2018 14:48:14 +0300 Subject: [PATCH 39/49] MAGETWO-93161: Fix Problems with Consumer Runners on Cloud Clusters --- .../Model/Cron/ConsumersRunner.php | 4 +++- .../Unit/Model/Cron/ConsumersRunnerTest.php | 20 ++++++++++--------- .../consumers_runner_functions_mocks.php | 14 +++++++++++++ 3 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 app/code/Magento/MessageQueue/Test/Unit/_files/consumers_runner_functions_mocks.php diff --git a/app/code/Magento/MessageQueue/Model/Cron/ConsumersRunner.php b/app/code/Magento/MessageQueue/Model/Cron/ConsumersRunner.php index c4620862b2e1..ceeb4badeefd 100644 --- a/app/code/Magento/MessageQueue/Model/Cron/ConsumersRunner.php +++ b/app/code/Magento/MessageQueue/Model/Cron/ConsumersRunner.php @@ -139,6 +139,8 @@ private function canBeRun($consumerName, array $allowedConsumers = []) */ private function getPidFilePath($consumerName) { - return $consumerName . static::PID_FILE_EXT; + $sanitizedHostname = preg_replace('/[^a-zA-Z0-9]/i', '', gethostname()); + + return $consumerName . '-' . $sanitizedHostname . static::PID_FILE_EXT; } } diff --git a/app/code/Magento/MessageQueue/Test/Unit/Model/Cron/ConsumersRunnerTest.php b/app/code/Magento/MessageQueue/Test/Unit/Model/Cron/ConsumersRunnerTest.php index 08c8f926522d..bf8796a03f52 100644 --- a/app/code/Magento/MessageQueue/Test/Unit/Model/Cron/ConsumersRunnerTest.php +++ b/app/code/Magento/MessageQueue/Test/Unit/Model/Cron/ConsumersRunnerTest.php @@ -51,6 +51,8 @@ class ConsumersRunnerTest extends \PHPUnit\Framework\TestCase */ protected function setUp() { + require_once __DIR__ . '/../../_files/consumers_runner_functions_mocks.php'; + $this->phpExecutableFinderMock = $this->getMockBuilder(phpExecutableFinder::class) ->disableOriginalConstructor() ->getMock(); @@ -116,7 +118,7 @@ public function testRun( $isRunExpects ) { $consumerName = 'consumerName'; - $pidFilePath = 'consumerName.pid'; + $pidFilePath = 'consumerName-myHostName.pid'; $this->deploymentConfigMock->expects($this->exactly(3)) ->method('get') @@ -164,7 +166,7 @@ public function runDataProvider() 'isRun' => false, 'php' => '', 'command' => 'php '. BP . '/bin/magento queue:consumers:start %s %s %s', - 'arguments' => ['consumerName', '--pid-file-path=consumerName.pid', '--max-messages=20000'], + 'arguments' => ['consumerName', '--pid-file-path=consumerName-myHostName.pid', '--max-messages=20000'], 'allowedConsumers' => [], 'shellBackgroundExpects' => 1, 'isRunExpects' => 1, @@ -174,7 +176,7 @@ public function runDataProvider() 'isRun' => false, 'php' => '', 'command' => 'php '. BP . '/bin/magento queue:consumers:start %s %s %s', - 'arguments' => ['consumerName', '--pid-file-path=consumerName.pid', '--max-messages=10000'], + 'arguments' => ['consumerName', '--pid-file-path=consumerName-myHostName.pid', '--max-messages=10000'], 'allowedConsumers' => [], 'shellBackgroundExpects' => 1, 'isRunExpects' => 1, @@ -184,7 +186,7 @@ public function runDataProvider() 'isRun' => false, 'php' => '', 'command' => 'php '. BP . '/bin/magento queue:consumers:start %s %s %s', - 'arguments' => ['consumerName', '--pid-file-path=consumerName.pid', '--max-messages=10000'], + 'arguments' => ['consumerName', '--pid-file-path=consumerName-myHostName.pid', '--max-messages=10000'], 'allowedConsumers' => ['someConsumer'], 'shellBackgroundExpects' => 0, 'isRunExpects' => 0, @@ -194,7 +196,7 @@ public function runDataProvider() 'isRun' => true, 'php' => '', 'command' => 'php '. BP . '/bin/magento queue:consumers:start %s %s %s', - 'arguments' => ['consumerName', '--pid-file-path=consumerName.pid', '--max-messages=10000'], + 'arguments' => ['consumerName', '--pid-file-path=consumerName-myHostName.pid', '--max-messages=10000'], 'allowedConsumers' => ['someConsumer'], 'shellBackgroundExpects' => 0, 'isRunExpects' => 0, @@ -204,7 +206,7 @@ public function runDataProvider() 'isRun' => true, 'php' => '', 'command' => 'php '. BP . '/bin/magento queue:consumers:start %s %s %s', - 'arguments' => ['consumerName', '--pid-file-path=consumerName.pid', '--max-messages=10000'], + 'arguments' => ['consumerName', '--pid-file-path=consumerName-myHostName.pid', '--max-messages=10000'], 'allowedConsumers' => [], 'shellBackgroundExpects' => 0, 'isRunExpects' => 1, @@ -214,7 +216,7 @@ public function runDataProvider() 'isRun' => true, 'php' => '', 'command' => 'php '. BP . '/bin/magento queue:consumers:start %s %s %s', - 'arguments' => ['consumerName', '--pid-file-path=consumerName.pid', '--max-messages=10000'], + 'arguments' => ['consumerName', '--pid-file-path=consumerName-myHostName.pid', '--max-messages=10000'], 'allowedConsumers' => ['consumerName'], 'shellBackgroundExpects' => 0, 'isRunExpects' => 1, @@ -224,7 +226,7 @@ public function runDataProvider() 'isRun' => false, 'php' => '', 'command' => 'php '. BP . '/bin/magento queue:consumers:start %s %s %s', - 'arguments' => ['consumerName', '--pid-file-path=consumerName.pid', '--max-messages=10000'], + 'arguments' => ['consumerName', '--pid-file-path=consumerName-myHostName.pid', '--max-messages=10000'], 'allowedConsumers' => ['consumerName'], 'shellBackgroundExpects' => 1, 'isRunExpects' => 1, @@ -234,7 +236,7 @@ public function runDataProvider() 'isRun' => false, 'php' => '/bin/php', 'command' => '/bin/php '. BP . '/bin/magento queue:consumers:start %s %s', - 'arguments' => ['consumerName', '--pid-file-path=consumerName.pid'], + 'arguments' => ['consumerName', '--pid-file-path=consumerName-myHostName.pid'], 'allowedConsumers' => ['consumerName'], 'shellBackgroundExpects' => 1, 'isRunExpects' => 1, diff --git a/app/code/Magento/MessageQueue/Test/Unit/_files/consumers_runner_functions_mocks.php b/app/code/Magento/MessageQueue/Test/Unit/_files/consumers_runner_functions_mocks.php new file mode 100644 index 000000000000..f703efd0644e --- /dev/null +++ b/app/code/Magento/MessageQueue/Test/Unit/_files/consumers_runner_functions_mocks.php @@ -0,0 +1,14 @@ + Date: Wed, 11 Jul 2018 15:05:12 +0300 Subject: [PATCH 40/49] MAGETWO-93161: Fix Problems with Consumer Runners on Cloud Clusters --- .../Test/Unit/_files/consumers_runner_functions_mocks.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/Magento/MessageQueue/Test/Unit/_files/consumers_runner_functions_mocks.php b/app/code/Magento/MessageQueue/Test/Unit/_files/consumers_runner_functions_mocks.php index f703efd0644e..788a8464a0ce 100644 --- a/app/code/Magento/MessageQueue/Test/Unit/_files/consumers_runner_functions_mocks.php +++ b/app/code/Magento/MessageQueue/Test/Unit/_files/consumers_runner_functions_mocks.php @@ -3,6 +3,8 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); + namespace Magento\MessageQueue\Model\Cron; /** From ad09eac53341af405f8e1baa37f7e61d7a36baca Mon Sep 17 00:00:00 2001 From: Bohdan Korablov Date: Wed, 11 Jul 2018 15:18:08 +0300 Subject: [PATCH 41/49] MAGETWO-93161: Fix Problems with Consumer Runners on Cloud Clusters --- app/code/Magento/MessageQueue/Model/Cron/ConsumersRunner.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/MessageQueue/Model/Cron/ConsumersRunner.php b/app/code/Magento/MessageQueue/Model/Cron/ConsumersRunner.php index ceeb4badeefd..f301fb9289ef 100644 --- a/app/code/Magento/MessageQueue/Model/Cron/ConsumersRunner.php +++ b/app/code/Magento/MessageQueue/Model/Cron/ConsumersRunner.php @@ -139,7 +139,7 @@ private function canBeRun($consumerName, array $allowedConsumers = []) */ private function getPidFilePath($consumerName) { - $sanitizedHostname = preg_replace('/[^a-zA-Z0-9]/i', '', gethostname()); + $sanitizedHostname = preg_replace('/[^a-z0-9]/i', '', gethostname()); return $consumerName . '-' . $sanitizedHostname . static::PID_FILE_EXT; } From b1ac916a2b5f960002df2c0e29ff9178930f4bcf Mon Sep 17 00:00:00 2001 From: Stanislav Idolov Date: Thu, 12 Jul 2018 15:05:00 +0300 Subject: [PATCH 42/49] =?UTF-8?q?ENGCOM-2216:=20Update=20Israeli=20ZIP=20c?= =?UTF-8?q?ode=20mask,=207=20digits=20instead=20of=205=20,according=20to?= =?UTF-8?q?=20the=E2=80=A6=20#16613?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Magento/Directory/Model/Country/Postcode/ValidatorTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev/tests/integration/testsuite/Magento/Directory/Model/Country/Postcode/ValidatorTest.php b/dev/tests/integration/testsuite/Magento/Directory/Model/Country/Postcode/ValidatorTest.php index b65aa7734f2d..45d84336337c 100644 --- a/dev/tests/integration/testsuite/Magento/Directory/Model/Country/Postcode/ValidatorTest.php +++ b/dev/tests/integration/testsuite/Magento/Directory/Model/Country/Postcode/ValidatorTest.php @@ -130,7 +130,7 @@ public function getPostcodesDataProvider() ['countryId' => 'IS', 'postcode' => '123'], ['countryId' => 'IN', 'postcode' => '123456'], ['countryId' => 'ID', 'postcode' => '12345'], - ['countryId' => 'IL', 'postcode' => '12345'], + ['countryId' => 'IL', 'postcode' => '1234567'], ['countryId' => 'IT', 'postcode' => '12345'], ['countryId' => 'JP', 'postcode' => '123-4567'], ['countryId' => 'JP', 'postcode' => '1234567'], From c0d9e1a3379c36172727ed21bb5382e2ea66b281 Mon Sep 17 00:00:00 2001 From: Bohdan Korablov Date: Thu, 12 Jul 2018 15:31:15 +0300 Subject: [PATCH 43/49] MAGETWO-93161: Fix Problems with Consumer Runners on Cloud Clusters --- .../Model/Cron/ConsumersRunnerTest.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/dev/tests/integration/testsuite/Magento/MessageQueue/Model/Cron/ConsumersRunnerTest.php b/dev/tests/integration/testsuite/Magento/MessageQueue/Model/Cron/ConsumersRunnerTest.php index f362e75ea790..4acba63d98e6 100644 --- a/dev/tests/integration/testsuite/Magento/MessageQueue/Model/Cron/ConsumersRunnerTest.php +++ b/dev/tests/integration/testsuite/Magento/MessageQueue/Model/Cron/ConsumersRunnerTest.php @@ -130,7 +130,7 @@ public function testCheckThatPidFilesWasCreated() public function testSpecificConsumerAndRerun() { $specificConsumer = 'quoteItemCleaner'; - $pidFilePath = $specificConsumer . ConsumersRunner::PID_FILE_EXT; + $pidFilePath = $this->getPidFileName($specificConsumer); $config = $this->config; $config['cron_consumers_runner'] = ['consumers' => [$specificConsumer], 'max_messages' => 0]; @@ -228,7 +228,7 @@ private function writeConfig(array $config) private function getPidFileFullPath($consumerName) { $directoryList = $this->objectManager->get(DirectoryList::class); - return $directoryList->getPath(DirectoryList::VAR_DIR) . '/' . $consumerName . ConsumersRunner::PID_FILE_EXT; + return $directoryList->getPath(DirectoryList::VAR_DIR) . '/' . $this->getPidFileName($consumerName); } /** @@ -239,7 +239,7 @@ protected function tearDown() foreach ($this->consumerConfig->getConsumers() as $consumer) { $consumerName = $consumer->getName(); $pidFileFullPath = $this->getPidFileFullPath($consumerName); - $pidFilePath = $consumerName . ConsumersRunner::PID_FILE_EXT; + $pidFilePath = $this->getPidFileName($consumerName); $pid = $this->pid->getPid($pidFilePath); if ($pid && $this->pid->isRun($pidFilePath)) { @@ -258,4 +258,15 @@ protected function tearDown() $this->writeConfig($this->config); $this->appConfig->reinit(); } + + /** + * @param string $consumerName The consumers name + * @return string The name to file with PID + */ + private function getPidFileName($consumerName) + { + $sanitizedHostname = preg_replace('/[^a-z0-9]/i', '', gethostname()); + + return $consumerName . '-' . $sanitizedHostname . ConsumersRunner::PID_FILE_EXT; + } } From f8c52ef17c1e43c7cbee1bc1606919cbe2bee704 Mon Sep 17 00:00:00 2001 From: Daniel Renaud Date: Thu, 12 Jul 2018 08:48:22 -0500 Subject: [PATCH 44/49] MAGETWO-64854: Incorrect Refund Logic can allow for double-refunds --- .../Mftf/Section/AdminMessagesSection.xml | 1 + .../EnableDisableBundleProductStatusTest.xml | 9 +- .../Section/AdminCreditMemoTotalSection.xml | 2 +- .../AdminOrderCreditMemosTabSection.xml | 1 + .../Framework/Math/FloatComparator.php | 59 +++++++++ .../Math/Test/Unit/FloatComparatorTest.php | 115 ++++++++++++++++++ 6 files changed, 184 insertions(+), 3 deletions(-) create mode 100644 lib/internal/Magento/Framework/Math/FloatComparator.php create mode 100644 lib/internal/Magento/Framework/Math/Test/Unit/FloatComparatorTest.php diff --git a/app/code/Magento/Backend/Test/Mftf/Section/AdminMessagesSection.xml b/app/code/Magento/Backend/Test/Mftf/Section/AdminMessagesSection.xml index cce21ea760c4..ff5e02397cbf 100644 --- a/app/code/Magento/Backend/Test/Mftf/Section/AdminMessagesSection.xml +++ b/app/code/Magento/Backend/Test/Mftf/Section/AdminMessagesSection.xml @@ -11,5 +11,6 @@
+
diff --git a/app/code/Magento/Bundle/Test/Mftf/Test/EnableDisableBundleProductStatusTest.xml b/app/code/Magento/Bundle/Test/Mftf/Test/EnableDisableBundleProductStatusTest.xml index d96714325891..e1434e22489c 100644 --- a/app/code/Magento/Bundle/Test/Mftf/Test/EnableDisableBundleProductStatusTest.xml +++ b/app/code/Magento/Bundle/Test/Mftf/Test/EnableDisableBundleProductStatusTest.xml @@ -75,11 +75,16 @@ - + + + + + + - + diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemoTotalSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemoTotalSection.xml index a49d06545df0..ca5e297b72ff 100644 --- a/app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemoTotalSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminCreditMemoTotalSection.xml @@ -10,7 +10,7 @@ xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
- + diff --git a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderCreditMemosTabSection.xml b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderCreditMemosTabSection.xml index f4835cf02b70..bb0e1618c66e 100644 --- a/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderCreditMemosTabSection.xml +++ b/app/code/Magento/Sales/Test/Mftf/Section/AdminOrderCreditMemosTabSection.xml @@ -12,5 +12,6 @@ +
\ No newline at end of file diff --git a/lib/internal/Magento/Framework/Math/FloatComparator.php b/lib/internal/Magento/Framework/Math/FloatComparator.php new file mode 100644 index 000000000000..405340436995 --- /dev/null +++ b/lib/internal/Magento/Framework/Math/FloatComparator.php @@ -0,0 +1,59 @@ + self::$epsilon; + } + + /** + * Compares if the first argument greater or equal to the second. + * + * @param float $a + * @param float $b + * @return bool + */ + public function greaterThanOrEqual(float $a, float $b): bool + { + return $this->equal($a, $b) || $this->greaterThan($a, $b); + } +} diff --git a/lib/internal/Magento/Framework/Math/Test/Unit/FloatComparatorTest.php b/lib/internal/Magento/Framework/Math/Test/Unit/FloatComparatorTest.php new file mode 100644 index 000000000000..c9e5143ee789 --- /dev/null +++ b/lib/internal/Magento/Framework/Math/Test/Unit/FloatComparatorTest.php @@ -0,0 +1,115 @@ +comparator = new FloatComparator(); + } + + /** + * Checks a case when `a` and `b` are equal. + * + * @param float $a + * @param float $b + * @param bool $expected + * @dataProvider eqDataProvider + */ + public function testEq(float $a, float $b, bool $expected) + { + self::assertEquals($expected, $this->comparator->equal($a, $b)); + } + + /** + * Gets list of variations to compare equal float. + * + * @return array + */ + public function eqDataProvider(): array + { + return [ + [10, 10.00001, true], + [10, 10.000001, true], + [10.0000099, 10.00001, true], + [1, 1.0001, false], + [1, -1.00001, false], + ]; + } + + /** + * Checks a case when `a` > `b`. + * + * @param float $a + * @param float $b + * @param bool $expected + * @dataProvider gtDataProvider + */ + public function testGt(float $a, float $b, bool $expected) + { + self::assertEquals($expected, $this->comparator->greaterThan($a, $b)); + } + + /** + * Gets list of variations to compare if `a` > `b`. + * + * @return array + */ + public function gtDataProvider(): array + { + return [ + [10, 10.00001, false], + [10, 10.000001, false], + [10.0000099, 10.00001, false], + [1.0001, 1, true], + [1, -1.00001, true], + ]; + } + + /** + * Checks a case when `a` >= `b`. + * + * @param float $a + * @param float $b + * @param bool $expected + * @dataProvider gteDataProvider + */ + public function testGte(float $a, float $b, bool $expected) + { + self::assertEquals($expected, $this->comparator->greaterThanOrEqual($a, $b)); + } + + /** + * Gets list of variations to compare if `a` >= `b`. + * + * @return array + */ + public function gteDataProvider(): array + { + return [ + [10, 10.00001, true], + [10, 10.000001, true], + [10.0000099, 10.00001, true], + [1.0001, 1, true], + [1, -1.00001, true], + [1.0001, 1.001, false], + ]; + } +} From bfaac1ffea81e5d12ed5377c6466b7266ed2cf13 Mon Sep 17 00:00:00 2001 From: Stanislav Idolov Date: Thu, 12 Jul 2018 17:34:37 +0300 Subject: [PATCH 45/49] magento/magento2#16663 [Forwardport] Fixed Issue #11354 Merged CSS file name generation --- lib/internal/Magento/Framework/View/Asset/Merged.php | 0 .../Magento/Framework/View/Test/Unit/Asset/MergedTest.php | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 lib/internal/Magento/Framework/View/Asset/Merged.php mode change 100755 => 100644 lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php diff --git a/lib/internal/Magento/Framework/View/Asset/Merged.php b/lib/internal/Magento/Framework/View/Asset/Merged.php old mode 100755 new mode 100644 diff --git a/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php b/lib/internal/Magento/Framework/View/Test/Unit/Asset/MergedTest.php old mode 100755 new mode 100644 From 228f7d8152b3e7bf87305a5ef687fc46e1f6dd3a Mon Sep 17 00:00:00 2001 From: Alex Kolesnyk Date: Fri, 13 Jul 2018 12:15:59 -0500 Subject: [PATCH 46/49] ENGCOM-2197: [Jenkins] Failure to generate MFTF Tests --- .../DisplayOutOfStockProductActionGroup.xml | 29 +++++++++++++++++++ .../Mftf/Page/InventoryConfigurationPage.xml | 12 ++++++++ .../Test/Mftf/Section/InventorySection.xml | 15 ++++++++++ 3 files changed, 56 insertions(+) create mode 100644 app/code/Magento/CatalogInventory/Test/Mftf/ActionGroup/DisplayOutOfStockProductActionGroup.xml create mode 100644 app/code/Magento/CatalogInventory/Test/Mftf/Page/InventoryConfigurationPage.xml create mode 100644 app/code/Magento/CatalogInventory/Test/Mftf/Section/InventorySection.xml diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/ActionGroup/DisplayOutOfStockProductActionGroup.xml b/app/code/Magento/CatalogInventory/Test/Mftf/ActionGroup/DisplayOutOfStockProductActionGroup.xml new file mode 100644 index 000000000000..1bec4cc99c0e --- /dev/null +++ b/app/code/Magento/CatalogInventory/Test/Mftf/ActionGroup/DisplayOutOfStockProductActionGroup.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/Page/InventoryConfigurationPage.xml b/app/code/Magento/CatalogInventory/Test/Mftf/Page/InventoryConfigurationPage.xml new file mode 100644 index 000000000000..95e873a3b164 --- /dev/null +++ b/app/code/Magento/CatalogInventory/Test/Mftf/Page/InventoryConfigurationPage.xml @@ -0,0 +1,12 @@ + + + + +
+ + diff --git a/app/code/Magento/CatalogInventory/Test/Mftf/Section/InventorySection.xml b/app/code/Magento/CatalogInventory/Test/Mftf/Section/InventorySection.xml new file mode 100644 index 000000000000..55fbc84ead96 --- /dev/null +++ b/app/code/Magento/CatalogInventory/Test/Mftf/Section/InventorySection.xml @@ -0,0 +1,15 @@ + + + +
+ + + + +
+
From 8f440ffebb3ba3cce7adfd79370a0283175f47cc Mon Sep 17 00:00:00 2001 From: Alex Kolesnyk Date: Mon, 16 Jul 2018 11:43:42 -0500 Subject: [PATCH 47/49] ENGCOM-2197: [Jenkins] Failure to generate MFTF Tests --- .../Mftf/Test/CreditMemoTotalAfterShippingDiscountTest.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Sales/Test/Mftf/Test/CreditMemoTotalAfterShippingDiscountTest.xml b/app/code/Magento/Sales/Test/Mftf/Test/CreditMemoTotalAfterShippingDiscountTest.xml index 26139f7182ba..2ff3d7756fe3 100644 --- a/app/code/Magento/Sales/Test/Mftf/Test/CreditMemoTotalAfterShippingDiscountTest.xml +++ b/app/code/Magento/Sales/Test/Mftf/Test/CreditMemoTotalAfterShippingDiscountTest.xml @@ -91,7 +91,8 @@ - + + From 267ae5b145e479910edbf8a2edced22eb14a7684 Mon Sep 17 00:00:00 2001 From: Stanislav Lopukhov Date: Tue, 17 Jul 2018 08:28:16 +0300 Subject: [PATCH 48/49] MAGETWO-93184: [Forwardport] Static Assets deployment throws errors when redis is used for cache --- .../Framework/App/Cache/Frontend/Factory.php | 20 +++---- .../Test/Unit/Cache/Frontend/FactoryTest.php | 2 +- .../Framework/Cache/Frontend/Adapter/Zend.php | 53 +++++++++++++++---- .../Test/Unit/Frontend/Adapter/ZendTest.php | 16 ++++-- .../Unit/Frontend/Decorator/ProfilerTest.php | 5 +- 5 files changed, 72 insertions(+), 24 deletions(-) diff --git a/lib/internal/Magento/Framework/App/Cache/Frontend/Factory.php b/lib/internal/Magento/Framework/App/Cache/Frontend/Factory.php index e8eca51aad97..f2bc4eceb507 100644 --- a/lib/internal/Magento/Framework/App/Cache/Frontend/Factory.php +++ b/lib/internal/Magento/Framework/App/Cache/Frontend/Factory.php @@ -147,15 +147,17 @@ public function create(array $options) $result = $this->_objectManager->create( \Magento\Framework\Cache\Frontend\Adapter\Zend::class, [ - 'frontend' => \Zend_Cache::factory( - $frontend['type'], - $backend['type'], - $frontend, - $backend['options'], - true, - true, - true - ) + 'frontendFactory' => function () use ($frontend, $backend) { + return \Zend_Cache::factory( + $frontend['type'], + $backend['type'], + $frontend, + $backend['options'], + true, + true, + true + ); + } ] ); $result = $this->_applyDecorators($result); diff --git a/lib/internal/Magento/Framework/App/Test/Unit/Cache/Frontend/FactoryTest.php b/lib/internal/Magento/Framework/App/Test/Unit/Cache/Frontend/FactoryTest.php index e87eca57c058..48a8420cfda6 100644 --- a/lib/internal/Magento/Framework/App/Test/Unit/Cache/Frontend/FactoryTest.php +++ b/lib/internal/Magento/Framework/App/Test/Unit/Cache/Frontend/FactoryTest.php @@ -128,7 +128,7 @@ protected function _buildModelForCreate($enforcedOptions = [], $decorators = []) $processFrontendFunc = function ($class, $params) { switch ($class) { case \Magento\Framework\Cache\Frontend\Adapter\Zend::class: - return new $class($params['frontend']); + return new $class($params['frontendFactory']); case \Magento\Framework\App\Test\Unit\Cache\Frontend\FactoryTest\CacheDecoratorDummy::class: $frontend = $params['frontend']; unset($params['frontend']); diff --git a/lib/internal/Magento/Framework/Cache/Frontend/Adapter/Zend.php b/lib/internal/Magento/Framework/Cache/Frontend/Adapter/Zend.php index c8917a099689..43d261c1ed07 100644 --- a/lib/internal/Magento/Framework/Cache/Frontend/Adapter/Zend.php +++ b/lib/internal/Magento/Framework/Cache/Frontend/Adapter/Zend.php @@ -16,11 +16,27 @@ class Zend implements \Magento\Framework\Cache\FrontendInterface protected $_frontend; /** - * @param \Zend_Cache_Core $frontend + * Factory that creates the \Zend_Cache_Cores + * + * @var \Closure + */ + private $frontendFactory; + + /** + * The pid that owns the $_frontend object + * + * @var int */ - public function __construct(\Zend_Cache_Core $frontend) + private $pid; + + /** + * @param \Closure $frontendFactory + */ + public function __construct(\Closure $frontendFactory) { - $this->_frontend = $frontend; + $this->frontendFactory = $frontendFactory; + $this->_frontend = $frontendFactory(); + $this->pid = getmypid(); } /** @@ -28,7 +44,7 @@ public function __construct(\Zend_Cache_Core $frontend) */ public function test($identifier) { - return $this->_frontend->test($this->_unifyId($identifier)); + return $this->getFrontEnd()->test($this->_unifyId($identifier)); } /** @@ -36,7 +52,7 @@ public function test($identifier) */ public function load($identifier) { - return $this->_frontend->load($this->_unifyId($identifier)); + return $this->getFrontEnd()->load($this->_unifyId($identifier)); } /** @@ -44,7 +60,7 @@ public function load($identifier) */ public function save($data, $identifier, array $tags = [], $lifeTime = null) { - return $this->_frontend->save($data, $this->_unifyId($identifier), $this->_unifyIds($tags), $lifeTime); + return $this->getFrontEnd()->save($data, $this->_unifyId($identifier), $this->_unifyIds($tags), $lifeTime); } /** @@ -52,13 +68,14 @@ public function save($data, $identifier, array $tags = [], $lifeTime = null) */ public function remove($identifier) { - return $this->_frontend->remove($this->_unifyId($identifier)); + return $this->getFrontEnd()->remove($this->_unifyId($identifier)); } /** * {@inheritdoc} * * @throws \InvalidArgumentException Exception is thrown when non-supported cleaning mode is specified + * @throws \Zend_Cache_Exception */ public function clean($mode = \Zend_Cache::CLEANING_MODE_ALL, array $tags = []) { @@ -76,7 +93,7 @@ public function clean($mode = \Zend_Cache::CLEANING_MODE_ALL, array $tags = []) "Magento cache frontend does not support the cleaning mode '{$mode}'." ); } - return $this->_frontend->clean($mode, $this->_unifyIds($tags)); + return $this->getFrontEnd()->clean($mode, $this->_unifyIds($tags)); } /** @@ -84,7 +101,7 @@ public function clean($mode = \Zend_Cache::CLEANING_MODE_ALL, array $tags = []) */ public function getBackend() { - return $this->_frontend->getBackend(); + return $this->getFrontEnd()->getBackend(); } /** @@ -92,7 +109,7 @@ public function getBackend() */ public function getLowLevelFrontend() { - return $this->_frontend; + return $this->getFrontEnd(); } /** @@ -119,4 +136,20 @@ protected function _unifyIds(array $ids) } return $ids; } + + /** + * Get frontEnd cache adapter for current pid + * + * @return \Zend_Cache_Core + */ + private function getFrontEnd() + { + if (getmypid() === $this->pid) { + return $this->_frontend; + } + $frontendFactory = $this->frontendFactory; + $this->_frontend = $frontendFactory(); + $this->pid = getmypid(); + return $this->_frontend; + } } diff --git a/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Adapter/ZendTest.php b/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Adapter/ZendTest.php index 4ed199f9c62f..fb646c7f8762 100644 --- a/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Adapter/ZendTest.php +++ b/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Adapter/ZendTest.php @@ -17,7 +17,10 @@ class ZendTest extends \PHPUnit\Framework\TestCase public function testProxyMethod($method, $params, $expectedParams, $expectedResult) { $frontendMock = $this->createMock(\Zend_Cache_Core::class); - $object = new \Magento\Framework\Cache\Frontend\Adapter\Zend($frontendMock); + $frontendFactory = function () use ($frontendMock) { + return $frontendMock; + }; + $object = new \Magento\Framework\Cache\Frontend\Adapter\Zend($frontendFactory); $helper = new \Magento\Framework\TestFramework\Unit\Helper\ProxyTesting(); $result = $helper->invokeWithExpectations( $object, @@ -82,7 +85,11 @@ public function testCleanException($cleaningMode, $expectedErrorMessage) { $this->expectException('InvalidArgumentException'); $this->expectExceptionMessage($expectedErrorMessage); - $object = new \Magento\Framework\Cache\Frontend\Adapter\Zend($this->createMock(\Zend_Cache_Core::class)); + $frontendMock = $this->createMock(\Zend_Cache_Core::class); + $frontendFactory = function () use ($frontendMock) { + return $frontendMock; + }; + $object = new \Magento\Framework\Cache\Frontend\Adapter\Zend($frontendFactory); $object->clean($cleaningMode); } @@ -110,7 +117,10 @@ public function cleanExceptionDataProvider() public function testGetLowLevelFrontend() { $frontendMock = $this->createMock(\Zend_Cache_Core::class); - $object = new \Magento\Framework\Cache\Frontend\Adapter\Zend($frontendMock); + $frontendFactory = function () use ($frontendMock) { + return $frontendMock; + }; + $object = new \Magento\Framework\Cache\Frontend\Adapter\Zend($frontendFactory); $this->assertSame($frontendMock, $object->getLowLevelFrontend()); } } diff --git a/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Decorator/ProfilerTest.php b/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Decorator/ProfilerTest.php index bef4617add1b..34e50900bc64 100644 --- a/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Decorator/ProfilerTest.php +++ b/lib/internal/Magento/Framework/Cache/Test/Unit/Frontend/Decorator/ProfilerTest.php @@ -63,7 +63,10 @@ public function proxyMethodDataProvider() { $backend = new \Zend_Cache_Backend_BlackHole(); $adaptee = $this->createMock(\Zend_Cache_Core::class); - $lowLevelFrontend = new \Magento\Framework\Cache\Frontend\Adapter\Zend($adaptee); + $frontendFactory = function () use ($adaptee) { + return $adaptee; + }; + $lowLevelFrontend = new \Magento\Framework\Cache\Frontend\Adapter\Zend($frontendFactory); return [ [ From 2b9413aca26a38bc50f2884ba26f9217dbad5c65 Mon Sep 17 00:00:00 2001 From: Cristian Partica Date: Tue, 17 Jul 2018 11:00:50 -0500 Subject: [PATCH 49/49] MAGETWO-92929: Declarative schema tests are located in inappropriate - fix test --- .../Setup/Test/Unit/SchemaListenerTest.php | 15 ++++++++------- .../Setup/Test/Unit/SchemaPersistorTest.php | 7 ++++--- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/lib/internal/Magento/Framework/Setup/Test/Unit/SchemaListenerTest.php b/lib/internal/Magento/Framework/Setup/Test/Unit/SchemaListenerTest.php index 38b81fa7c744..4e34b3aebbf3 100644 --- a/lib/internal/Magento/Framework/Setup/Test/Unit/SchemaListenerTest.php +++ b/lib/internal/Magento/Framework/Setup/Test/Unit/SchemaListenerTest.php @@ -3,6 +3,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Framework\Setup\Test\Unit; @@ -30,7 +31,7 @@ class SchemaListenerTest extends \PHPUnit\Framework\TestCase */ private $objectManagerHelper; - protected function setUp() + protected function setUp() : void { $this->objectManagerHelper = new ObjectManagerHelper($this); $this->model = $this->objectManagerHelper->getObject( @@ -51,7 +52,7 @@ protected function setUp() /** * @return Table */ - private function getCreateTableDDL($tableName) + private function getCreateTableDDL($tableName) : Table { $table = new Table(); $table->setName($tableName); @@ -91,7 +92,7 @@ private function getCreateTableDDL($tableName) ); } - public function testRenameTable() + public function testRenameTable() : void { $this->model->setModuleName('First_Module'); $this->model->createTable($this->getCreateTableDDL('old_table')); @@ -101,7 +102,7 @@ public function testRenameTable() self::assertArrayNotHasKey('old_table', $tables['First_Module']); } - public function testDropIndex() + public function testDropIndex() : void { $this->model->setModuleName('First_Module'); $this->model->createTable($this->getCreateTableDDL('index_table')); @@ -109,7 +110,7 @@ public function testDropIndex() self::assertTrue($this->model->getTables()['First_Module']['index_table']['indexes']['INDEX_KEY']['disabled']); } - public function testCreateTable() + public function testCreateTable() : void { $this->model->setModuleName('First_Module'); $this->model->createTable($this->getCreateTableDDL('new_table')); @@ -201,7 +202,7 @@ public function testCreateTable() ); } - public function testDropTable() + public function testDropTable() : void { $this->model->setModuleName('Old_Module'); $this->model->createTable($this->getCreateTableDDL('old_table')); @@ -210,7 +211,7 @@ public function testDropTable() self::assertTrue($this->model->getTables()['New_Module']['old_table']['disabled']); } - public function testDropTableInSameModule() + public function testDropTableInSameModule() : void { $this->model->setModuleName('Old_Module'); $this->model->createTable($this->getCreateTableDDL('old_table')); diff --git a/lib/internal/Magento/Framework/Setup/Test/Unit/SchemaPersistorTest.php b/lib/internal/Magento/Framework/Setup/Test/Unit/SchemaPersistorTest.php index 9e416fc51475..cc88af15a262 100644 --- a/lib/internal/Magento/Framework/Setup/Test/Unit/SchemaPersistorTest.php +++ b/lib/internal/Magento/Framework/Setup/Test/Unit/SchemaPersistorTest.php @@ -3,6 +3,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +declare(strict_types=1); namespace Magento\Framework\Setup\Test\Unit; @@ -38,7 +39,7 @@ class SchemaPersistorTest extends \PHPUnit\Framework\TestCase */ private $xmlPersistor; - protected function setUp() + protected function setUp() : void { $this->componentRegistrarMock = $this->getMockBuilder(ComponentRegistrar::class) ->disableOriginalConstructor() @@ -60,7 +61,7 @@ protected function setUp() * @param array $tables * @param string $expectedXML */ - public function testPersist(array $tables, $expectedXML) + public function testPersist(array $tables, $expectedXML) : void { $moduleName = 'First_Module'; /** @var SchemaListener|\PHPUnit_Framework_MockObject_MockObject $schemaListenerMock */ @@ -88,7 +89,7 @@ public function testPersist(array $tables, $expectedXML) * * @return array */ - public function schemaListenerTablesDataProvider() + public function schemaListenerTablesDataProvider() : array { return [ [