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 ); } }