1 | <?php |
||||
2 | |||||
3 | namespace Ikechukwukalu\Requirepin\Tests; |
||||
4 | |||||
5 | use Ikechukwukalu\Requirepin\RequirePinServiceProvider; |
||||
6 | use Ikechukwukalu\Requirepin\Controllers\PinController; |
||||
7 | use Ikechukwukalu\Requirepin\Tests\Controllers\BookController; |
||||
8 | use Illuminate\Foundation\Testing\RefreshDatabase; |
||||
9 | use Orchestra\Testbench\TestCase as BaseTestCase; |
||||
10 | use Stevebauman\Location\LocationServiceProvider; |
||||
11 | |||||
12 | abstract class TestCase extends BaseTestCase |
||||
13 | { |
||||
14 | use RefreshDatabase; |
||||
0 ignored issues
–
show
introduced
by
![]() |
|||||
15 | |||||
16 | public function setUp(): void |
||||
17 | { |
||||
18 | parent::setUp(); |
||||
19 | } |
||||
20 | |||||
21 | protected function defineDatabaseMigrations() |
||||
22 | { |
||||
23 | $this->loadLaravelMigrations(); |
||||
24 | $this->loadMigrationsFrom(__DIR__.'/migrations'); |
||||
25 | } |
||||
26 | |||||
27 | protected function defineRoutes($router) |
||||
28 | { |
||||
29 | // Define routes. |
||||
30 | $router->get('login', function () { |
||||
31 | return 'login'; |
||||
32 | })->name('login'); |
||||
33 | |||||
34 | $router->post('test/v1/sample/books', [BookController::class, 'createBook']) |
||||
35 | ->name('createBookTest') |
||||
36 | ->middleware('require.pin'); |
||||
37 | |||||
38 | $router->delete('test/v1/sample/books/{id}', [BookController::class, 'deleteBook']) |
||||
39 | ->name('deleteBookTest') |
||||
40 | ->middleware('require.pin'); |
||||
41 | |||||
42 | $router->post('/test/change/pin', [PinController::class, 'changePin']) |
||||
43 | ->name('changePin'); |
||||
44 | |||||
45 | $router->post('/test/pin/required/{uuid}', [PinController::class, |
||||
46 | 'pinRequired'])->name('pinRequired'); |
||||
47 | } |
||||
48 | |||||
49 | protected function getPackageProviders($app): array |
||||
0 ignored issues
–
show
The parameter
$app is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. ![]() |
|||||
50 | { |
||||
51 | return [RequirePinServiceProvider::class, |
||||
52 | LocationServiceProvider::class]; |
||||
53 | } |
||||
54 | |||||
55 | protected function getEnvironmentSetUp($app) { |
||||
56 | $app['config']->set('auth.guards.sanctum', [ |
||||
57 | 'driver' => 'session', |
||||
58 | 'provider' => 'users', |
||||
59 | ]); |
||||
60 | } |
||||
61 | } |
||||
62 |