mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fix constructor signature of BaseContext (in BaseContextDataTest.php)
This commit is contained in:
parent
5481d029e8
commit
d1e09d7047
@ -28,7 +28,6 @@ final class BaseContextDataTest extends KernelTestCase
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
self::bootKernel();
|
||||
}
|
||||
|
||||
@ -46,12 +45,9 @@ final class BaseContextDataTest extends KernelTestCase
|
||||
|
||||
public function testGenerateWithUser()
|
||||
{
|
||||
$security = $this->prophesize(Security::class);
|
||||
$security->getUser()->willReturn(new User());
|
||||
$context = $this->buildBaseContext();
|
||||
|
||||
$context = $this->buildBaseContext($security->reveal());
|
||||
|
||||
$actual = $context->getData();
|
||||
$actual = $context->getData(new User());
|
||||
|
||||
$this->assertIsArray($actual);
|
||||
$this->assertArrayHasKey('creator', $actual);
|
||||
@ -60,11 +56,9 @@ final class BaseContextDataTest extends KernelTestCase
|
||||
}
|
||||
|
||||
private function buildBaseContext(
|
||||
?Security $security = null,
|
||||
?NormalizerInterface $normalizer = null
|
||||
): BaseContextData {
|
||||
return new BaseContextData(
|
||||
$security ?? self::$container->get(Security::class),
|
||||
$normalizer ?? self::$container->get(NormalizerInterface::class)
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user