Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
eightyfive committed Sep 15, 2022
1 parent d3472e3 commit 2c59107
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
4 changes: 2 additions & 2 deletions tests/AutorouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,15 @@ public function testAddsConstraints(): void
public function testLoadsFile(): void
{
$autoroute = $this->getAutoroute();
$autoroute->load(__DIR__ . "/web.yaml");
$autoroute->load([__DIR__ . "/web.yaml"]);

$this->assertRoutes(["post.store"]);
}

public function testLoadsFiles(): void
{
$autoroute = $this->getAutoroute(__DIR__);
$autoroute->load("api.yaml", "web.yaml");
$autoroute->load(["api.yaml", "web.yaml"]);

$this->assertRoutes(["user.get", "user.store", "post.store"]);
}
Expand Down
13 changes: 8 additions & 5 deletions tests/api.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
users:
get:
uses: UserController@get
post:
uses: UserController@store
prefix: v1
namespace: App\Http\Controllers
paths:
users:
get:
uses: UserController@get
post:
uses: UserController@store
8 changes: 5 additions & 3 deletions tests/web.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
posts:
post:
uses: PostController@store
namespace: App\Http\Controllers
paths:
posts:
post:
uses: PostController@store

0 comments on commit 2c59107

Please sign in to comment.