Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Commit

Permalink
remove redundant tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
azjezz authored Apr 21, 2019
1 parent 1177ae2 commit f89d6f0
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions tests/RouterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,7 @@ public function testMethodNotAllowedResponses(
list($responder, $_data) =
$router->routeMethodAndPath(HttpMethod::HEAD, 'getonly');
expect($responder)->toBeSame('getonly');
expect(() ==> $router->routeMethodAndPath(HttpMethod::GET, 'headonly'))->toThrow(
MethodNotAllowedException::class,
);

try {
$router->routeMethodAndPath(HttpMethod::GET, 'headonly');
static::fail(
Expand All @@ -155,9 +153,7 @@ public function testMethodNotAllowedResponses(
} catch(MethodNotAllowedException $e) {
expect($e->getAllowedMethods())->toContain(HttpMethod::HEAD);
}
expect(() ==> $router->routeMethodAndPath(HttpMethod::HEAD, 'postonly'))->toThrow(
MethodNotAllowedException::class,
);

try {
$router->routeMethodAndPath(HttpMethod::HEAD, 'postonly');
static::fail(
Expand All @@ -166,9 +162,7 @@ public function testMethodNotAllowedResponses(
} catch(MethodNotAllowedException $e) {
expect($e->getAllowedMethods())->toContain(HttpMethod::POST);
}
expect(() ==> $router->routeMethodAndPath(HttpMethod::GET, 'postonly'))->toThrow(
MethodNotAllowedException::class,
);

try {
$router->routeMethodAndPath(HttpMethod::GET, 'postonly');
static::fail(
Expand All @@ -177,7 +171,6 @@ public function testMethodNotAllowedResponses(
} catch(MethodNotAllowedException $e) {
expect($e->getAllowedMethods())->toContain(HttpMethod::POST);
}

}

<<DataProvider('expectedMatches')>>
Expand Down

0 comments on commit f89d6f0

Please sign in to comment.