Files
bokio-api-laravel/tests/TestCase.php
T
2025-06-30 09:54:44 +02:00

38 lines
957 B
PHP

<?php
namespace Mattitja\BokioApiLaravel\Tests;
use Illuminate\Database\Eloquent\Factories\Factory;
use Mattitja\BokioApiLaravel\BokioApiLaravelServiceProvider;
use Orchestra\Testbench\TestCase as Orchestra;
class TestCase extends Orchestra
{
protected function setUp(): void
{
parent::setUp();
Factory::guessFactoryNamesUsing(
fn (string $modelName) => 'Mattitja\\BokioApiLaravel\\Database\\Factories\\'.class_basename($modelName).'Factory'
);
}
protected function getPackageProviders($app)
{
return [
BokioApiLaravelServiceProvider::class,
];
}
public function getEnvironmentSetUp($app)
{
config()->set('database.default', 'testing');
/*
foreach (\Illuminate\Support\Facades\File::allFiles(__DIR__ . '/database/migrations') as $migration) {
(include $migration->getRealPath())->up();
}
*/
}
}