コード例 #1
0
 public function testSetGetLoadDefault()
 {
     $this->assertFalse($this->_collection->getLoadDefault());
     $this->_collection->setLoadDefault(true);
     $this->assertTrue($this->_collection->getLoadDefault());
     $this->_collection->setLoadDefault(false);
     $this->assertFalse($this->_collection->getLoadDefault());
 }
コード例 #2
0
 /**
  * @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;
 }