Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions tests/Console/SyncProvidedRoutesCommandTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php
namespace Tests\Console;

use Tests\BaseTest;

class SyncProvidedRoutesCommandTest extends BaseTest
{
public function testHandle()
{
$this->artisan('dynamic-route:provided:sync');
$this->assertTrue(true);
}
}
13 changes: 13 additions & 0 deletions tests/Service/RouteClosureProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,17 @@ public function testGetClosureById()
$this->assertInstanceOf(Closure::class, RouteClosureProvider::forRouteId(1));
}

public function testForRoute()
{
$route = DynamicRoute::create([
'method' => 'get',
'name' => 'test',
'pattern' => '/test',
'handler' => 'RedirectRouteHandler',
'configuration' => ['target' => '/'],
]);

$this->assertInstanceOf(Closure::class, RouteClosureProvider::forRoute($route));
}

}