public function testDispatchWithoutCallable() { Slim_Environment::mock(array('REQUEST_METHOD' => 'GET', 'REMOTE_ADDR' => '127.0.0.1', 'SCRIPT_NAME' => '', 'PATH_INFO' => '/hello/josh', 'QUERY_STRING' => 'one=1&two=2&three=3', 'SERVER_NAME' => 'slim', 'SERVER_PORT' => 80, 'slim.url_scheme' => 'http', 'slim.input' => '', 'slim.errors' => fopen('php://stderr', 'w'), 'HTTP_HOST' => 'slim')); $env = Slim_Environment::getInstance(); $req = new Slim_Http_Request($env); $res = new Slim_Http_Response(); $router = new Slim_Router($req, $res); $route = new Slim_Route('/hello/:name', 'foo'); $route->setRouter($router); $route->matches($req->getResourceUri()); //<-- Extracts params from resource URI $this->assertFalse($route->dispatch()); }