ldc-file-storage-service/tests/TestCase.php
Jérémy Munsch fc267c330c
feat(tests): add initial test structure and example tests
- Introduced Pest testing framework with basic test cases.
- Created TestCase and ExampleTest for unit testing.
- Updated phpunit.xml for improved test configuration.
2026-11-03 16:20:14 +01:00

42 lines
1.1 KiB
PHP

<?php
declare(strict_types=1);
namespace Uwil\Storage\Tests;
use Orchestra\Testbench\TestCase as Orchestra;
use Uwil\Storage\StorageServiceProvider;
abstract class TestCase extends Orchestra
{
#[\Override]
protected function setUp(): void
{
parent::setUp();
}
#[\Override]
protected function getPackageProviders($app): array
{
return [
StorageServiceProvider::class,
];
}
#[\Override]
protected function defineEnvironment($app): void
{
$app['config']->set('database.default', 'testing');
$app['config']->set('database.connections.testing', [
'driver' => 'sqlite',
'database' => ':memory:',
'prefix' => '',
]);
$app['config']->set('storage-service.default', 'local');
$app['config']->set('storage-service.eligibleDisks', ['local']);
$app['config']->set('storage-service.allowedExtensions', [
'jpg', 'jpeg', 'png', 'gif', 'pdf', 'txt', 'doc', 'docx', 'csv', 'mp4', 'webm',
]);
}
}