Ejemplo n.º 1
0
 public function testChainingAssembleWithRegex()
 {
     $chain = new Zend_Controller_Router_Route_Chain();
     $foo = new Zend_Controller_Router_Route_Hostname('www.zend.com', array('foo' => 'foo'));
     $bar = new Zend_Controller_Router_Route_Regex('bar', array('bar' => 'bar'), array(), 'bar');
     $chain->chain($foo)->chain($bar);
     $request = new Zend_Controller_Router_ChainTest_Request('http://www.zend.com/bar');
     $res = $chain->match($request);
     $this->assertTrue(is_array($res));
     $this->assertRegexp('#[^a-z0-9]?www\\.zend\\.com/bar$#i', $chain->assemble());
 }