Skip to content

Commit 078cad0

Browse files
committed
AC-15627::[Integration Tests] Composer Build Failure - 2.4.9-alpha3
1 parent d299581 commit 078cad0

File tree

3 files changed

+258
-61
lines changed

3 files changed

+258
-61
lines changed

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/Persistent/Model/Checkout/ConfigProviderPluginTest.php

Lines changed: 30 additions & 8 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 2020 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -20,6 +20,12 @@
2020
use Magento\TestFramework\Interception\PluginList;
2121
use Magento\TestFramework\Quote\Model\GetQuoteByReservedOrderId;
2222
use PHPUnit\Framework\TestCase;
23+
use Magento\TestFramework\Fixture\DataFixture;
24+
use Magento\TestFramework\Fixture\Config;
25+
use Magento\Customer\Test\Fixture\Customer;
26+
use Magento\Quote\Test\Fixture\CustomerCart;
27+
use Magento\Catalog\Test\Fixture\Product as ProductFixture;
28+
use Magento\Quote\Test\Fixture\AddProductToCart as AddProductToCartFixture;
2329

2430
/**
2531
* Test for checkout config provider plugin
@@ -131,11 +137,19 @@ public function testWithLoggedCustomer(): void
131137
}
132138

133139
/**
134-
* @magentoDataFixture Magento/Checkout/_files/quote_with_customer_without_address.php
135-
* @magentoConfigFixture current_store persistent/options/enabled 0
136-
*
137140
* @return void
138141
*/
142+
#[
143+
Config('persistent/options/enabled', 0, scopeType: \Magento\Store\Model\ScopeInterface::SCOPE_STORE),
144+
DataFixture(Customer::class, as: 'customer'),
145+
DataFixture(
146+
CustomerCart::class,
147+
['customer_id' => '$customer.id$', 'reserved_order_id' => 'test_order_with_customer_without_address'],
148+
as: 'cart'
149+
),
150+
DataFixture(ProductFixture::class, as: 'product'),
151+
DataFixture(AddProductToCartFixture::class, ['cart_id' => '$cart.id$', 'product_id' => '$product.id$']),
152+
]
139153
public function testPersistentDisabled(): void
140154
{
141155
$quote = $this->getQuoteByReservedOrderId->execute('test_order_with_customer_without_address');
@@ -145,11 +159,19 @@ public function testPersistentDisabled(): void
145159
}
146160

147161
/**
148-
* @magentoDataFixture Magento/Checkout/_files/quote_with_customer_without_address.php
149-
* @magentoConfigFixture current_store persistent/options/enabled 1
150-
*
151162
* @return void
152163
*/
164+
#[
165+
Config('persistent/options/enabled', 1, scopeType: \Magento\Store\Model\ScopeInterface::SCOPE_STORE),
166+
DataFixture(Customer::class, as: 'customer'),
167+
DataFixture(
168+
CustomerCart::class,
169+
['customer_id' => '$customer.id$', 'reserved_order_id' => 'test_order_with_customer_without_address'],
170+
as: 'cart'
171+
),
172+
DataFixture(ProductFixture::class, as: 'product'),
173+
DataFixture(AddProductToCartFixture::class, ['cart_id' => '$cart.id$', 'product_id' => '$product.id$']),
174+
]
153175
public function testWithoutPersistentSession(): void
154176
{
155177
$quote = $this->getQuoteByReservedOrderId->execute('test_order_with_customer_without_address');

0 commit comments

Comments
 (0)