/** * @dataProvider routeProvider * @param Wildcard $route * @param string $path * @param integer $offset * @param array $params * @param boolean $skipAssembling */ public function testAssembling(Wildcard $route, $path, $offset, array $params = null, $skipAssembling = false) { if ($params === null || $skipAssembling) { // Data which will not match are not tested for assembling. return; } $result = $route->assemble($params); if ($offset !== null) { $this->assertEquals($offset, strpos($path, $result, $offset)); } else { $this->assertEquals($path, $result); } }
public function testGetAssembledParams() { $route = new Wildcard(); $route->assemble(array('foo' => 'bar')); $this->assertEquals(array('foo'), $route->getAssembledParams()); }