Пример #1
0
 /**
  * @param Mage_Core_Model_Event_Manager $eventDispatcher
  * @param Mage_Core_Model_Cache $cacheManager
  * @param Magento_Filesystem $filesystem
  * @param Mage_Core_Model_Resource_Abstract $resource
  * @param Varien_Data_Collection_Db $resourceCollection
  * @param array $data
  */
 public function __construct(Mage_Core_Model_Event_Manager $eventDispatcher, Mage_Core_Model_Cache $cacheManager, Magento_Filesystem $filesystem, Mage_Core_Model_Resource_Abstract $resource = null, Varien_Data_Collection_Db $resourceCollection = null, array $data = array())
 {
     parent::__construct($eventDispatcher, $cacheManager, $resource, $resourceCollection, $data);
     $this->_filesystem = $filesystem;
     $this->_filePath = Magento_Filesystem::getAbsolutePath(Mage::getBaseDir() . DS . 'robots.txt');
 }
Пример #2
0
 /**
  * @dataProvider absolutePathDataProvider
  * @param string $path
  * @param string $expected
  */
 public function testGetAbsolutePath($path, $expected)
 {
     $this->assertEquals($expected, Magento_Filesystem::getAbsolutePath($path));
 }