Category: testing

Could I load fixtures from different entity managers with LiipTestFixturesBundle

I have entities which are managed by two entity managers in Symfony 4 project and I would like to load fixtures from both connections for functional tests. For instance : class AdapterTest extends KernelTestCase { use FixturesTrait; … protected function…

Symfony, WebTestCase case, crashes because of a service not used in a test

I’m writing Symfony 4.3 phpunit funcional tests. And When I try to to launch the tests I get this error message: SymfonyComponentDependencyInjectionExceptionRuntimeException: Cannot autowire service “fixtures class”: argument “$encoder” of method “__construct()” references interface “SymfonyComponentSecurityCoreEncoderUserPasswordEncoderInterface” but no such service exists….

Symfony 4 – PHPUnit – Difficults with the setUp() method

I’m following the Symfony Cast Stripe formation. They use Symfony 3 and I use Symfony 4. I try to make some test like in the formation : https://symfonycasts.com/screencast/stripe-level2/testing-webhooks#play But when I run the test, I’ve this error : Fatal error:…