From 80f1993859da9f46d6588e29b7a1c456c66bed8e Mon Sep 17 00:00:00 2001 From: Maxime Huran Date: Wed, 3 Nov 2021 11:27:27 +0100 Subject: [PATCH] Change some files in tests folder --- tests/Behat/DemoContext.php | 57 ------------------------------------- tests/Unit/.gitkeep | 0 2 files changed, 57 deletions(-) delete mode 100644 tests/Behat/DemoContext.php create mode 100644 tests/Unit/.gitkeep diff --git a/tests/Behat/DemoContext.php b/tests/Behat/DemoContext.php deleted file mode 100644 index 2d81bf5..0000000 --- a/tests/Behat/DemoContext.php +++ /dev/null @@ -1,57 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE.txt - * file that was distributed with this source code. - */ - -declare(strict_types=1); - -namespace App\Tests\Behat; - -use Behat\Behat\Context\Context; -use Symfony\Component\HttpFoundation\Request; -use Symfony\Component\HttpFoundation\Response; -use Symfony\Component\HttpKernel\KernelInterface; - -/** - * This context class contains the definitions of the steps used by the demo - * feature file. Learn how to get started with Behat and BDD on Behat's website. - * - * @see http://behat.org/en/latest/quick_start.html - */ -final class DemoContext implements Context -{ - /** @var KernelInterface */ - private $kernel; - - /** @var Response|null */ - private $response; - - public function __construct(KernelInterface $kernel) - { - $this->kernel = $kernel; - } - - /** - * @When a demo scenario sends a request to :path - */ - public function aDemoScenarioSendsARequestTo(string $path): void - { - $this->response = $this->kernel->handle(Request::create($path, 'GET')); - } - - /** - * @Then the response should be received - */ - public function theResponseShouldBeReceived(): void - { - if (null === $this->response) { - throw new \RuntimeException('No response received'); - } - } -} diff --git a/tests/Unit/.gitkeep b/tests/Unit/.gitkeep new file mode 100644 index 0000000..e69de29