Skip to content

Commit

Permalink
test: improving coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ipranjal committed Aug 7, 2023
1 parent 11c13fb commit 3c0f11a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/Unit/RouterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

it('tests router dispatch method ', function (bool $cache) {

$collection = getCollection($cache);

$this->router = new \Scrawler\Router\Router();
$this->router->register(__DIR__."/../Demo","Tests\Demo");
Expand All @@ -14,6 +13,8 @@
expect($status)->toBe(\Scrawler\Router\Router::FOUND);
expect($response)->toBe('Hello pranjal');

$cache = new Kodus\Cache\FileCache(__DIR__.'/cache',10);
$this->router->enableCache($cache);
[$status,$handler,$args,$debug] = $this->router->dispatch('GET','/hello/world');
expect($status)->toBe(\Scrawler\Router\Router::NOT_FOUND);

Expand Down

0 comments on commit 3c0f11a

Please sign in to comment.