From 73f2a96527a40e535910fb85af3062ecd7f136d2 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Tue, 10 Dec 2024 15:55:59 +0100 Subject: [PATCH] Fix mock test --- Tests/Unit/DependencyInjection/Compiler/MappingPassTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Tests/Unit/DependencyInjection/Compiler/MappingPassTest.php b/Tests/Unit/DependencyInjection/Compiler/MappingPassTest.php index 7e1db459..0ac8cfed 100644 --- a/Tests/Unit/DependencyInjection/Compiler/MappingPassTest.php +++ b/Tests/Unit/DependencyInjection/Compiler/MappingPassTest.php @@ -16,6 +16,7 @@ use PHPUnit\Framework\TestCase; use Symfony\Component\DependencyInjection\Alias; use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; /** * Unit tests for MappingPass. @@ -85,6 +86,9 @@ function ($parameter) use ($managers) { ) ); + $containerMock->expects($this->exactly(1))->method('getParameterBag') + ->willReturn(new ParameterBag()); + $containerMock->expects($this->once())->method('get')->with($this->anything()) ->will( $this->returnCallback(