Skip to content

Commit 51c2764

Browse files
authored
Merge pull request #10119 from magento-gl/spartans_pr_19092025
[Spartans] BugFix Delivery
2 parents add7c46 + efd8707 commit 51c2764

File tree

22 files changed

+1104
-131
lines changed

22 files changed

+1104
-131
lines changed

app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Save.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ public function execute()
273273
$data['default_value'] = null;
274274
} elseif (isset($data['default'])) {
275275
$defaultOptions = [];
276-
foreach ($data['default'] as $defaultValue) {
276+
foreach ((array)$data['default'] as $defaultValue) {
277277
if ((int)$defaultValue > 0) {
278278
$defaultOptions[] = $defaultValue;
279279
}

app/code/Magento/Catalog/Test/Unit/Controller/Adminhtml/Product/Attribute/SaveTest.php

Lines changed: 638 additions & 1 deletion
Large diffs are not rendered by default.

dev/tests/integration/testsuite/Magento/Catalog/Model/Product/Option/Type/DateTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2016 Adobe
4+
* All Rights Reserved.
55
*/
66

77
namespace Magento\Catalog\Model\Product\Option\Type;
@@ -119,7 +119,7 @@ public static function prepareOptionValueForRequestDataProvider()
119119
/**
120120
* Check date in prepareForCart method with javascript calendar and Asia/Singapore timezone
121121
*
122-
* @dataProvider testPrepareForCartDataProvider
122+
* @dataProvider datePrepareForCartDataProvider
123123
* @param array $dateData
124124
* @param array $productOptionData
125125
* @param array $requestData
@@ -154,7 +154,7 @@ public function testPrepareForCart(
154154
*
155155
* @return array
156156
*/
157-
public static function testPrepareForCartDataProvider()
157+
public static function datePrepareForCartDataProvider()
158158
{
159159
return [
160160
[

dev/tests/integration/testsuite/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/EavTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2016 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -225,7 +225,7 @@ private function prepareAttributeSet(array $additional): void
225225

226226
/**
227227
* @magentoDataFixture Magento/Catalog/_files/attribute_page_layout_default.php
228-
* @dataProvider testModifyMetaNewProductPageLayoutDefaultProvider
228+
* @dataProvider attrModifyMetaNewProductPageLayoutDefaultProvider
229229
* @return void
230230
*/
231231
public function testModifyMetaNewProductPageLayoutDefault($attributesMeta): void
@@ -245,7 +245,7 @@ public function testModifyMetaNewProductPageLayoutDefault($attributesMeta): void
245245
/**
246246
* @return array
247247
*/
248-
public static function testModifyMetaNewProductPageLayoutDefaultProvider(): array
248+
public static function attrModifyMetaNewProductPageLayoutDefaultProvider(): array
249249
{
250250
return [
251251
'attributes_meta' => [

dev/tests/integration/testsuite/Magento/CatalogSearch/Controller/Advanced/ResultTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2019 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -171,7 +171,7 @@ public function testExecuteWithArrayInParam(array $searchParams): void
171171
* @magentoAppArea frontend
172172
* @magentoDataFixture Magento/CatalogSearch/_files/product_for_search.php
173173
* @magentoDataFixture Magento/CatalogSearch/_files/full_reindex.php
174-
* @dataProvider testDataForAttributesCombination
174+
* @dataProvider searchDataForAttributesCombination
175175
*
176176
* @param array $searchParams
177177
* @param bool $isProductShown
@@ -381,7 +381,7 @@ private function getAttributeOptionValueByOptionLabel(string $attributeCode, str
381381
*
382382
* @return array
383383
*/
384-
public static function testDataForAttributesCombination(): array
384+
public static function searchDataForAttributesCombination(): array
385385
{
386386
return [
387387
'search_product_by_name_and_price' => [

dev/tests/integration/testsuite/Magento/Cms/Model/BlockTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2017 Adobe
4+
* All Rights Reserved.
55
*/
66
namespace Magento\Cms\Model;
77

@@ -58,7 +58,7 @@ protected function setUp(): void
5858
* @throws \Exception
5959
* @throws \Magento\Framework\Exception\NoSuchEntityException
6060
* @magentoDbIsolation enabled
61-
* @dataProvider testGetByIdentifierDataProvider
61+
* @dataProvider blockGetByIdentifierDataProvider
6262
*/
6363
public function testGetByIdentifier(array $blockData)
6464
{
@@ -79,7 +79,7 @@ public function testGetByIdentifier(array $blockData)
7979
* @throws \Exception
8080
* @throws \Magento\Framework\Exception\NoSuchEntityException
8181
* @magentoDbIsolation enabled
82-
* @dataProvider testGetByIdentifierDataProvider
82+
* @dataProvider blockGetByIdentifierDataProvider
8383
*/
8484
public function testUpdateTime(array $blockData)
8585
{
@@ -112,7 +112,7 @@ public function testUpdateTime(array $blockData)
112112
* Data provider for "testGetByIdentifier" and "testUpdateTime" method
113113
* @return array
114114
*/
115-
public static function testGetByIdentifierDataProvider(): array
115+
public static function blockGetByIdentifierDataProvider(): array
116116
{
117117
return [
118118
[

dev/tests/integration/testsuite/Magento/Cms/Model/PageTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2014 Adobe
4+
* All Rights Reserved.
55
*/
66
namespace Magento\Cms\Model;
77

@@ -34,7 +34,7 @@ protected function setUp(): void
3434
* @param array $pageData
3535
* @throws \Magento\Framework\Exception\NoSuchEntityException
3636
* @magentoDbIsolation enabled
37-
* @dataProvider testGetByIdentifierDataProvider
37+
* @dataProvider pageGetByIdentifierDataProvider
3838
*/
3939
public function testGetByIdentifier(array $pageData)
4040
{
@@ -122,7 +122,7 @@ public static function generateIdentifierFromTitleDataProvider() : array
122122
* Data provider for "testGetByIdentifier" method
123123
* @return array
124124
*/
125-
public static function testGetByIdentifierDataProvider() : array
125+
public static function pageGetByIdentifierDataProvider() : array
126126
{
127127
return [
128128
['pageData' => [

dev/tests/integration/testsuite/Magento/Cms/Model/Wysiwyg/Images/StorageTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
5-
*
3+
* Copyright 2013 Adobe
4+
* All Rights Reserved.
65
*/
76
namespace Magento\Cms\Model\Wysiwyg\Images;
87

@@ -239,7 +238,7 @@ public function testUploadFileWithExcludedDirPath(): void
239238
* @param string|null $storageType
240239
*
241240
* @return void
242-
* @dataProvider testUploadFileWithWrongExtensionDataProvider
241+
* @dataProvider filenameUploadFileWithWrongExtensionDataProvider
243242
*/
244243
public function testUploadFileWithWrongExtension(string $fileName, string $fileType, ?string $storageType): void
245244
{
@@ -268,7 +267,7 @@ public function testUploadFileWithWrongExtension(string $fileName, string $fileT
268267
/**
269268
* @return array
270269
*/
271-
public static function testUploadFileWithWrongExtensionDataProvider(): array
270+
public static function filenameUploadFileWithWrongExtensionDataProvider(): array
272271
{
273272
return [
274273
[

dev/tests/integration/testsuite/Magento/Customer/Ui/Component/Listing/Column/DobColumnTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Magento\Framework\View\Element\UiComponentFactory;
1111
use Magento\TestFramework\Helper\Bootstrap;
1212
use PHPUnit\Framework\TestCase;
13+
use Magento\Framework\Component\ComponentRegistrar;
1314

1415
class DobColumnTest extends TestCase
1516
{
@@ -36,7 +37,9 @@ protected function setUp(): void
3637
*/
3738
public function testDobColumnDoesNotHaveDateFormatInXml(): void
3839
{
39-
$xmlPath = BP . '/app/code/Magento/Customer/view/adminhtml/ui_component/customer_listing.xml';
40+
$componentRegistrar = Bootstrap::getObjectManager()->get(ComponentRegistrar::class);
41+
$moduleDir = $componentRegistrar->getPath(ComponentRegistrar::MODULE, 'Magento_Customer');
42+
$xmlPath = $moduleDir . '/view/adminhtml/ui_component/customer_listing.xml';
4043
$this->assertFileExists($xmlPath, 'Customer listing XML file should exist');
4144

4245
$xmlContent = file_get_contents($xmlPath);

dev/tests/integration/testsuite/Magento/Framework/Image/Adapter/InterfaceTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ public function testValidateUploadFile()
756756
}
757757

758758
/**
759-
* @dataProvider testValidateUploadFileExceptionDataProvider
759+
* @dataProvider imageValidateUploadFileExceptionDataProvider
760760
* @param string $fileName
761761
* @param string $expectedErrorMsg
762762
* @param bool $useFixture
@@ -779,7 +779,7 @@ public function testValidateUploadFileException($fileName, $expectedErrorMsg, $u
779779
/**
780780
* @return array
781781
*/
782-
public static function testValidateUploadFileExceptionDataProvider()
782+
public static function imageValidateUploadFileExceptionDataProvider()
783783
{
784784
return [
785785
'image_notfound' => [

0 commit comments

Comments
 (0)