Ejemplo n.º 1
0
 /**
  * Test that URI params can be matched by RegEx
  * 
  * @test
  * @loadFixture config.yaml
  * @dataProvider dataProvider
  */
 public function testRegexUriParams($uriParamSets = array(), $expectedCount = 0)
 {
     $actualKeys = array();
     foreach ($uriParamSets as $uriParams) {
         $this->_resetParams();
         Mage::app()->getRequest()->setParams($uriParams);
         $actualKeys[] = $this->_helper->getKey();
     }
     $this->assertCount($expectedCount, array_unique($actualKeys), sprintf('%d different keys expected', $expectedCount));
 }
Ejemplo n.º 2
0
 /**
  * @test
  */
 public function getFullActionName()
 {
     Mage::app()->getRequest()->setRouteName('f');
     Mage::app()->getRequest()->setControllerName('p');
     Mage::app()->getRequest()->setActionName('c');
     $this->assertEquals('f_p_c', $this->_helper->getFullActionName());
 }