Skip to content

Rename "billing_regione" to "billing_region" #26681

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 18 commits into
base: 2.4-develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@
*/
namespace Magento\Sales\Model\ResourceModel\Order\Customer;

/**
* Customer collection
*/
class Collection extends \Magento\Customer\Model\ResourceModel\Customer\Collection
{
/**
* @inheritDoc
*
* @return $this
*/
protected function _initSelect()
Expand Down Expand Up @@ -38,7 +43,7 @@ protected function _initSelect()
null,
'left'
)->joinAttribute(
'billing_regione',
'billing_region',
'customer_address/region',
'default_billing',
null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@
<argument name="type" xsi:type="string">country</argument>
</arguments>
</block>
<block class="Magento\Backend\Block\Widget\Grid\Column" name="adminhtml.customer.grid.columnSet.billing_regione" as="billing_regione">
<block class="Magento\Backend\Block\Widget\Grid\Column" name="adminhtml.customer.grid.columnSet.billing_region" as="billing_regione">
<arguments>
<argument name="header" xsi:type="string" translate="true">State/Province</argument>
<argument name="index" xsi:type="string">billing_regione</argument>
<argument name="index" xsi:type="string">billing_region</argument>
</arguments>
</block>
<block class="Magento\Backend\Block\Widget\Grid\Column" name="adminhtml.customer.grid.columnSet.store_name" as="store_name">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);

namespace Magento\Sales\Model\ResourceModel\Order\Customer;

use Magento\TestFramework\Helper\Bootstrap;
use PHPUnit\Framework\TestCase;

class CollectionTest extends TestCase
{
/**
* @var Collection
*/
private $collection;

/**
* @inheritDoc
*/
public function setUp()
{
$objectManager = Bootstrap::getObjectManager();
$this->collection = $objectManager->get(Collection::class);
}

/**
* Attribute presence test
*
* @magentoDataFixture Magento/Customer/_files/customer.php
* @magentoDataFixture Magento/Customer/_files/customer_address.php
* @dataProvider joinAttribute
* @param string $attribute
* @return void
*/
public function testAttributePresent($attribute): void
{
$customers = $this->collection->getItems();
foreach ($customers as $customer) {
$this->assertNotEmpty($customer->getData($attribute), "Attribute '$attribute' is not present");
}
}

/**
* Attribute data provider
*
* @return array
*/
public function joinAttribute():array
{
return [
['billing_postcode'],
['billing_city'],
['billing_telephone'],
['billing_region'],
['billing_country_id']
];
}
}
8 changes: 4 additions & 4 deletions setup/performance-toolkit/benchmark.jmx
Original file line number Diff line number Diff line change
Expand Up @@ -25113,9 +25113,9 @@ catch (java.lang.Exception e) {
<stringProp name="Argument.metadata">=</stringProp>
<boolProp name="HTTPArgument.use_equals">true</boolProp>
</elementProp>
<elementProp name="billing_regione" elementType="HTTPArgument">
<elementProp name="billing_region" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">true</boolProp>
<stringProp name="Argument.name">billing_regione</stringProp>
<stringProp name="Argument.name">billing_region</stringProp>
<stringProp name="Argument.value"/>
<stringProp name="Argument.metadata">=</stringProp>
<boolProp name="HTTPArgument.use_equals">true</boolProp>
Expand Down Expand Up @@ -66284,9 +66284,9 @@ catch (java.lang.Exception e) {
<stringProp name="Argument.metadata">=</stringProp>
<boolProp name="HTTPArgument.use_equals">true</boolProp>
</elementProp>
<elementProp name="billing_regione" elementType="HTTPArgument">
<elementProp name="billing_region" elementType="HTTPArgument">
<boolProp name="HTTPArgument.always_encode">true</boolProp>
<stringProp name="Argument.name">billing_regione</stringProp>
<stringProp name="Argument.name">billing_region</stringProp>
<stringProp name="Argument.value"/>
<stringProp name="Argument.metadata">=</stringProp>
<boolProp name="HTTPArgument.use_equals">true</boolProp>
Expand Down