This commit is contained in:
2026-09-15 10:26:34 +08:00
commit ecf36afa56
10493 changed files with 1404888 additions and 0 deletions
@@ -0,0 +1,32 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
/**
* Tests for customer addresses collection
*/
namespace Magento\Customer\Model\ResourceModel\Address;
class CollectionTest extends \PHPUnit\Framework\TestCase
{
public function testSetCustomerFilter()
{
$collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
\Magento\Customer\Model\ResourceModel\Address\Collection::class
);
$select = $collection->getSelect();
$this->assertSame($collection, $collection->setCustomerFilter([1, 2]));
$customer = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(
\Magento\Customer\Model\Customer::class
);
$collection->setCustomerFilter($customer);
$customer->setId(3);
$collection->setCustomerFilter($customer);
$this->assertStringMatchesFormat(
'%AWHERE%S(%Sparent_id%S IN(%S1%S, %S2%S))%SAND%S(%Sparent_id%S = %S-1%S)%SAND%S(%Sparent_id%S = %S3%S)%A',
(string)$select
);
}
}