Example #1
0
 public function testMatch()
 {
     if (!Magento_Test_Bootstrap::canTestHeaders()) {
         $this->markTestSkipped('Can\'t test get match without sending headers');
     }
     $request = new Magento_Test_Request();
     $this->assertNull($this->_model->match($request));
     $this->_model->collectRoutes('frontend', 'standard');
     $this->assertInstanceOf('Mage_Core_Controller_Varien_Action', $this->_model->match($request));
     $request->setRequestUri('core/index/index');
     $this->assertInstanceOf('Mage_Core_Controller_Varien_Action', $this->_model->match($request));
     $request->setPathInfo('not_exists/not_exists/not_exists')->setModuleName('not_exists')->setControllerName('not_exists')->setActionName('not_exists');
     $this->assertNull($this->_model->match($request));
 }