Пример #1
0
 /**
  * @param string $sourcePath
  * @param string $resultPath
  *
  * @dataProvider applyRewritesDataProvider
  * @magentoConfigFixture global/rewrite/test_url/from /test\/(\w*)/
  * @magentoConfigFixture global/rewrite/test_url/to   new_test/$1/subdirectory
  * @magentoDataFixture Mage/Core/_files/url_rewrite.php
  * @magentoDbIsolation enabled
  */
 public function testApplyRewrites($sourcePath, $resultPath)
 {
     /** @var $request Mage_Core_Controller_Request_Http */
     $request = $this->_objectManager->create('Mage_Core_Controller_Request_Http');
     $request->setPathInfo($sourcePath);
     $this->_model->applyRewrites($request);
     $this->assertEquals($resultPath, $request->getPathInfo());
 }