コード例 #1
0
 /**
  * @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;
 }
コード例 #2
0
ファイル: CollectionTest.php プロジェクト: aiesh/magento2
 /**
  * @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());
 }