| 123456789101112131415161718192021222324252627282930313233 |
- <?php
- namespace App\Tests\Application;
- use Symfony\Component\HttpFoundation\Request;
- use Symfony\Component\DomCrawler\Crawler;
- use \Symfony\Bundle\FrameworkBundle\KernelBrowser;
- use \Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
- /**
- * Base class for applicative tests
- */
- abstract class OtWebTestCase extends WebTestCase
- {
- protected KernelBrowser $client;
- public function setup(): void {
- $this->client = static::createClient();
- }
- /**
- * @param string $route
- * @param array<mixed> $parameters
- * @return Crawler
- */
- protected function get(string $route, array $parameters = []): Crawler {
- return $this->client->request(
- Request::METHOD_GET,
- $route,
- $parameters
- );
- }
- }
|