This commit is contained in:
Jérémy Guillot
2024-06-03 17:36:22 +02:00
commit bddcdd6823
73 changed files with 13150 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
<?php
namespace App\Tests\Functional;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Zenstruck\Browser\HttpOptions;
use Zenstruck\Browser\KernelBrowser;
use Zenstruck\Browser\Test\HasBrowser;
use Zenstruck\Foundry\Test\Factories;
use Zenstruck\Foundry\Test\ResetDatabase;
abstract class ApiTestCase extends KernelTestCase
{
use ResetDatabase, Factories, HasBrowser {
browser as baseKernelBrowser;
}
protected function browser(array $options = [], array $server = []): KernelBrowser
{
return $this->baseKernelBrowser($options, $server)
->setDefaultHttpOptions(
HttpOptions::create()
->withHeader('Accept', 'application/ld+json')
);
}
}