Skip to content

Commit 7a3e19f

Browse files
committed
Revert "fix: mercure"
This reverts commit e2fd9a1.
1 parent c2cc727 commit 7a3e19f

5 files changed

Lines changed: 4 additions & 34 deletions

File tree

tests/Behat/CommandContext.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
use Behat\Gherkin\Node\TableNode;
1919
use GraphQL\Error\Error;
2020
use PHPUnit\Framework\Assert;
21-
use Psr\Container\ContainerInterface;
2221
use Symfony\Bundle\FrameworkBundle\Console\Application;
2322
use Symfony\Component\Console\Command\Command;
2423
use Symfony\Component\Console\Tester\CommandTester;
@@ -35,9 +34,7 @@ final class CommandContext implements Context
3534

3635
private ?CommandTester $commandTester = null;
3736

38-
private ?KernelInterface $kernel = null;
39-
40-
public function __construct(private readonly ContainerInterface $driverContainer)
37+
public function __construct(private KernelInterface $kernel)
4138
{
4239
}
4340

@@ -95,10 +92,6 @@ public function getApplication(): Application
9592
return $this->application;
9693
}
9794

98-
if (null === $this->kernel) {
99-
$this->kernel = $this->driverContainer->get('kernel');
100-
}
101-
10295
$this->application = new Application($this->kernel);
10396

10497
return $this->application;

tests/Behat/MercureContext.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,7 @@ public function mercureUpdateShouldHaveData(int $index, PyStringNode $data): voi
103103
}
104104
/** @var Update $update */
105105
$update = $updates[$index - 1];
106-
107-
$expectedData = json_decode($data->getRaw(), true, 512, \JSON_THROW_ON_ERROR);
108-
$actualData = json_decode($update->getData(), true, 512, \JSON_THROW_ON_ERROR);
109-
Assert::assertEquals($expectedData, $actualData);
106+
Assert::assertJsonStringEqualsJsonString($data->getRaw(), $update->getData());
110107
}
111108

112109
/**

tests/Fixtures/app/config/config_behat_mercure.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

tests/Fixtures/app/config/config_behat_mongodb.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ services:
33
autowire: true
44
autoconfigure: true
55

6-
ApiPlatform\Tests\Behat\CommandContext:
7-
$driverContainer: '@behat.driver.service_container'
6+
ApiPlatform\Tests\Behat\CommandContext: ~
87
ApiPlatform\Tests\Behat\DoctrineContext:
98
$doctrine: '@doctrine_mongodb'
109
ApiPlatform\Tests\Behat\HttpCacheContext: ~

tests/Fixtures/app/config/config_behat_orm.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@ services:
44
autowire: true
55
autoconfigure: true
66

7-
ApiPlatform\Tests\Behat\CommandContext:
8-
$driverContainer: '@behat.driver.service_container'
7+
ApiPlatform\Tests\Behat\CommandContext: ~
98
ApiPlatform\Tests\Behat\DoctrineContext:
109
$doctrine: '@doctrine'
1110
ApiPlatform\Tests\Behat\HttpCacheContext: ~

0 commit comments

Comments
 (0)