Ejemplo n.º 1
0
 /**
  * Test sets param when not exists
  */
 public function testSetRouteParamWhenNotExists()
 {
     // Prepare route
     $requestUri = '/hello/mr/anderson';
     $route = new Slim_Route('/hello/:first/:last', 'fooCallable');
     // Parse route params
     $this->assertTrue($route->matches($requestUri));
     // Get param
     try {
         $param = $route->setParam('foo', 'bar');
         $this->fail('Did not catch expected InvalidArgumentException');
     } catch (InvalidArgumentException $e) {
     }
 }