/** * @param \Magento\Store\Model\Resource\Store\Collection $storeCollection * @param \Magento\Directory\Model\Resource\Region\Collection $regionCollection * @param \Magento\Directory\Model\CountryFactory $countryFactory * @param \Magento\Tax\Model\Calculation\RateFactory $taxRateFactory */ public function __construct(\Magento\Store\Model\Resource\Store\Collection $storeCollection, \Magento\Directory\Model\Resource\Region\Collection $regionCollection, \Magento\Directory\Model\CountryFactory $countryFactory, \Magento\Tax\Model\Calculation\RateFactory $taxRateFactory) { // prevent admin store from loading $this->_publicStores = $storeCollection->setLoadDefault(false); $this->_regionCollection = $regionCollection; $this->_countryFactory = $countryFactory; $this->_taxRateFactory = $taxRateFactory; }
/** * @covers \Magento\Framework\Model\Resource\Db\Collection\AbstractCollection::join */ public function testJoin() { $this->_collection->join(array('w' => 'store_website'), 'main_table.website_id=w.website_id'); $this->assertContains('store_website', (string) $this->_collection->getSelect()); }