Skip to content

Commit

Permalink
Tests: annotate with @testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
f3l1x committed Jun 18, 2021
1 parent ba5d23c commit bfdd673
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/ApiRoute.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,7 @@ public function match(Nette\Http\IRequest $httpRequest): ?array
$path = substr($url->getPath(), strlen($basePath));

// Ensure start with /
if ($path === '' || $path[0] !== '/') {
$path = '/' . $path;
}
$path = '/' . ltrim($path, '/');

/**
* Build path mask
Expand Down
3 changes: 3 additions & 0 deletions tests/cases/ApiRouteSpecTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

require __DIR__ . '/../bootstrap.php';

/**
* @testCase
*/
final class ApiRouteSpecTest extends TestCase
{

Expand Down
3 changes: 3 additions & 0 deletions tests/cases/ApiRouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@

require __DIR__ . '/../bootstrap.php';

/**
* @testCase
*/
final class ApiRouteTest extends TestCase
{

Expand Down
3 changes: 3 additions & 0 deletions tests/cases/ApiRoutesResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@

require __DIR__ . '/../bootstrap.php';

/**
* @testCase
*/
final class ApiRoutesResolverTest extends TestCase
{

Expand Down

0 comments on commit bfdd673

Please sign in to comment.