Example #1
0
 /**
  * Test bundle with method URL handler behaviours
  */
 public function testLangBundleMethodParamsUrlHandler()
 {
     $this->router->handle('/en/test/method/param1/param2');
     $this->assertEquals($this->router->getActionNamespace(), 'Test\\Action\\Method\\CliMethodAction');
     $this->assertEquals($this->router->getResponderNamespace(), 'Test\\Responder\\Method\\CliMethodResponder');
     $this->assertEquals($this->router->getAction(), 'CliMethod');
     $this->assertEquals($this->router->getBundle(), 'test');
     $this->assertEquals($this->router->getParams(), ['param1', 'param2']);
 }
Example #2
0
 /**
  * Test bundle and action in subdirectory and params URL handler behaviours
  */
 public function testBundleSubdirActionParamsUrlHandler()
 {
     $this->router->handle('/_/test/param1/subdir/param2/test/param3/');
     $this->assertEquals($this->router->getActionNamespace(), 'Test\\Action\\Subdir\\TestAction');
     $this->assertEquals($this->router->getResponderNamespace(), 'Test\\Responder\\Subdir\\TestResponder');
     $this->assertEquals($this->router->getAction(), 'test');
     $this->assertEquals($this->router->getBundle(), 'test');
     $this->assertEquals($this->router->getParams(), ['param1', 'param2', 'param3']);
 }