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