canylmz /
laravel-rating
| 1 | <?php |
||
| 2 | |||
| 3 | namespace Canylmz\Rating\Test; |
||
| 4 | |||
| 5 | use Canylmz\Rating\RatingServiceProvider; |
||
| 6 | use Orchestra\Testbench\TestCase as Orchestra; |
||
| 7 | |||
| 8 | abstract class TestCase extends Orchestra |
||
| 9 | { |
||
| 10 | public function setUp(): void |
||
| 11 | { |
||
| 12 | parent::setUp(); |
||
| 13 | |||
| 14 | $this->loadLaravelMigrations(['--database' => 'testbench']); |
||
| 15 | $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); |
||
| 16 | $this->loadMigrationsFrom(__DIR__.'/database/migrations'); |
||
| 17 | $this->withFactories(__DIR__.'/database/factories'); |
||
| 18 | |||
| 19 | $this->artisan('migrate', ['--database' => 'testbench'])->run(); |
||
| 20 | } |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Define package providers. |
||
| 24 | * |
||
| 25 | * @param \Illuminate\Foundation\Application $app |
||
| 26 | * @return array |
||
| 27 | */ |
||
| 28 | protected function getPackageProviders($app) |
||
|
0 ignored issues
–
show
|
|||
| 29 | { |
||
| 30 | return [ |
||
| 31 | RatingServiceProvider::class, |
||
| 32 | ]; |
||
| 33 | } |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Define environment setup. |
||
| 37 | * |
||
| 38 | * @param \Illuminate\Foundation\Application $app |
||
| 39 | * @return void |
||
| 40 | */ |
||
| 41 | protected function getEnvironmentSetUp($app) |
||
| 42 | { |
||
| 43 | // Setup default database to use sqlite :memory: |
||
| 44 | $app['config']->set('database.default', 'testbench'); |
||
| 45 | $app['config']->set('database.connections.testbench', [ |
||
| 46 | 'driver' => 'sqlite', |
||
| 47 | 'database' => ':memory:', |
||
| 48 | 'prefix' => '', |
||
| 49 | ]); |
||
| 50 | } |
||
| 51 | } |
||
| 52 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.