Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rustamwin committed Nov 9, 2023
1 parent 33f3003 commit 782bf91
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions tests/Debug/DebugRoutesCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@

use PHPUnit\Framework\TestCase;
use Symfony\Component\Console\Tester\CommandTester;
use Yiisoft\Router\Builder\RouteBuilder;
use Yiisoft\Router\Debug\DebugRoutesCommand;
use Yiisoft\Router\Route;
use Yiisoft\Router\RouteCollection;
use Yiisoft\Router\RouteCollector;
use Yiisoft\Router\Tests\Support\TestController;
Expand All @@ -25,12 +25,12 @@ public function testBase(): void
$command = new DebugRoutesCommand(
new RouteCollection(
(new RouteCollector())->addRoute(
Route::get('/')
RouteBuilder::get('/')
->host('example.com')
->defaults(['SpecialArg' => 1])
->action(fn () => 'Hello, XXXXXX!')
->name('site/index'),
Route::get('/about')
RouteBuilder::get('/about')
->action([TestController::class, 'index'])
->name('site/about'),
),
Expand Down Expand Up @@ -61,13 +61,13 @@ public function testSpecificRoute(): void
$command = new DebugRoutesCommand(
new RouteCollection(
(new RouteCollector())->addRoute(
Route::get('/')
RouteBuilder::get('/')
->host('example.com')
->defaults(['SpecialArg' => 1])
->name('site/index')
->middleware(TestMiddleware1::class)
->action(fn () => 'Hello world!'),
Route::get('/about')->name('site/about'),
RouteBuilder::get('/about')->name('site/about'),
),
),
new Debugger(
Expand Down
3 changes: 2 additions & 1 deletion tests/Debug/UrlMatcherInterfaceProxyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Nyholm\Psr7\ServerRequest;
use PHPUnit\Framework\TestCase;
use Yiisoft\Http\Method;
use Yiisoft\Router\CurrentRoute;
use Yiisoft\Router\Debug\RouterCollector;
use Yiisoft\Router\Debug\UrlMatcherInterfaceProxy;
Expand All @@ -19,7 +20,7 @@ final class UrlMatcherInterfaceProxyTest extends TestCase
public function testBase(): void
{
$request = new ServerRequest('GET', '/');
$route = Route::get('/');
$route = new Route([Method::GET], '/');
$arguments = ['a' => 19];
$result = MatchingResult::fromSuccess($route, $arguments);

Expand Down

0 comments on commit 782bf91

Please sign in to comment.