OtWebTestCase.php 571 B

1234567891011121314151617181920212223
  1. <?php
  2. namespace App\Tests\Application;
  3. use Symfony\Component\HttpFoundation\Request;
  4. use Symfony\Component\DomCrawler\Crawler;
  5. class OtWebTestCase extends \Symfony\Bundle\FrameworkBundle\Test\WebTestCase
  6. {
  7. protected \Symfony\Bundle\FrameworkBundle\KernelBrowser $client;
  8. public function setup(): void {
  9. self::ensureKernelShutdown();
  10. $this->client = static::createClient();
  11. }
  12. protected function get(string $route): Crawler {
  13. return $this->client->request(
  14. Request::METHOD_GET,
  15. $route
  16. );
  17. }
  18. }