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 all 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 @@ -117,7 +117,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_region">
<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
Expand Up @@ -21,12 +21,18 @@ class CollectionTest extends TestCase
*/
private $objectManager;

/**
* @var Collection
*/
private $collection;

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

/**
Expand Down Expand Up @@ -85,4 +91,37 @@ public function testCollectionWithWebsiteStoreFilter(): void
$this->assertEquals($website->getName(), $customerWithStoreWebsiteFilter->getWebsiteName());
$this->assertEquals($store->getName(), $customerWithStoreWebsiteFilter->getStoreName());
}

/**
* Attribute data provider
*
* @return array
*/
public function joinAttribute():array
{
return [
['billing_postcode'],
['billing_city'],
['billing_telephone'],
['billing_region'],
['billing_country_id']
];
}

/**
* 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");
}
}
}