Skip to content

Commit 457b41d

Browse files
committed
improvements
1 parent ad29a01 commit 457b41d

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

tests/TestCase.php

+6-5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace Spatie\Feed\Test;
44

55
use Carbon\Carbon;
6+
use Illuminate\Support\Facades\Route;
67
use Illuminate\Support\Str;
78
use Spatie\Feed\FeedServiceProvider;
89
use Spatie\Snapshots\MatchesSnapshots;
@@ -99,7 +100,7 @@ protected function getEnvironmentSetUp($app)
99100
}
100101

101102

102-
private function renderBlade($app, string $template, array $data = [])
103+
private function renderBlade($app, string $template, array $data = []): string
103104
{
104105
$tempDirectory = dirname(__FILE__) . '/temp';
105106

@@ -114,15 +115,15 @@ private function renderBlade($app, string $template, array $data = [])
114115
}
115116

116117

117-
protected function setUpRoutes($app)
118+
protected function setUpRoutes($app): void
118119
{
119-
$app['router']->feeds('feedBaseUrl');
120+
Route::feeds('feedBaseUrl');
120121

121-
$app['router']->get('/test-route', function () use ($app) {
122+
Route::get('/test-route', function () use ($app) {
122123
return $app['view']->make('feed::links');
123124
});
124125

125-
$app['router']->get('/test-route-blade-component', function () use ($app) {
126+
Route::get('/test-route-blade-component', function () use ($app) {
126127
return $this->renderBlade($app, '<x-feed-links />');
127128
});
128129
}

0 commit comments

Comments
 (0)