Esempio n. 1
0
 public function testUndefinedRoute()
 {
     $route = new router\Container();
     $exception = null;
     try {
         $route->route('undefined/route');
     } catch (ErrorException $e) {
         $exception = $e;
     } finally {
         $this->tester->assertTrue($exception instanceof router\NotFound);
     }
 }
Esempio n. 2
0
 protected function extractParamNames($pattern, array $values)
 {
     $key = $this->keyPrefix . ':' . $pattern . ':' . $this->stateKey;
     $item = $this->pool->getItem($key);
     if (!$item->isHit()) {
         $item->set(parent::extractParamNames($pattern, $values));
         $item->expiresAfter($this->ttl);
         $this->pool->save($item);
     }
     return $item->get();
 }