Jérémy Decool 2/3/2015

Mocker un service Symfony2 dans un test Behat

Read Original

Cet article explique comment contourner l'impossibilité de modifier directement le conteneur de dépendances depuis un contexte Behat pour mocker des services (comme un composant Facebook). Il propose une solution basée sur la configuration d'environnements Symfony (config_test.yml) pour remplacer les services par des mocks lors de l'exécution des tests.

Mocker un service Symfony2 dans un test Behat

Comments

No comments yet

Be the first to share your thoughts!

Browser Extension

Get instant access to AllDevBlogs from your browser

Top of the Week

2
Designing Design Systems
TkDodo Dominik Dorfmeister 2 votes
4
Fragments Dec 11
Martin Fowler 1 votes
5
Adding Type Hints to my Blog
Daniel Feldroy 1 votes
6
Refactoring English: Month 12
Michael Lynch 1 votes
8
10
You Gotta Push If You Wanna Pull
Gunnar Morling 1 votes