turahe /
laravel-counters
| 1 | <?php |
||
| 2 | namespace Turahe\Counters\Tests; |
||
| 3 | |||
| 4 | use Illuminate\Database\Schema\Blueprint; |
||
| 5 | |||
| 6 | class TestCase extends \Orchestra\Testbench\TestCase |
||
| 7 | { |
||
| 8 | public function setUp(): void |
||
| 9 | { |
||
| 10 | parent::setUp(); |
||
| 11 | |||
| 12 | $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); |
||
| 13 | $this->setUpDatabase(); |
||
| 14 | } |
||
| 15 | |||
| 16 | /** |
||
| 17 | * {@inheritdoc} |
||
| 18 | */ |
||
| 19 | protected function getPackageProviders($app) |
||
|
0 ignored issues
–
show
|
|||
| 20 | { |
||
| 21 | return [\Turahe\Counters\CountersServiceProvider::class]; |
||
| 22 | } |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @param \Illuminate\Foundation\Application $app |
||
| 26 | */ |
||
| 27 | protected function getEnvironmentSetUp($app) |
||
| 28 | { |
||
| 29 | $app['config']->set('database.default', 'sqlite'); |
||
| 30 | $app['config']->set('database.connections.sqlite', [ |
||
| 31 | 'driver' => 'sqlite', |
||
| 32 | 'database' => ':memory:', |
||
| 33 | 'prefix' => '', |
||
| 34 | ]); |
||
| 35 | $app['config']->set('app.key', 'base64:MFOsOH9RomiI2LRdgP4hIeoQJ5nyBhdABdH77UY2zi8='); |
||
| 36 | } |
||
| 37 | |||
| 38 | protected function setUpDatabase() |
||
| 39 | { |
||
| 40 | $this->app['db']->connection()->getSchemaBuilder()->create('posts', function (Blueprint $table) { |
||
| 41 | $table->increments('id'); |
||
| 42 | $table->string('name'); |
||
| 43 | $table->timestamps(); |
||
| 44 | }); |
||
| 45 | } |
||
| 46 | } |
||
| 47 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.