informatique:php:behaviour-driven_development_php
Différences
Ci-dessous, les différences entre deux révisions de la page.
| Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
| informatique:php:behaviour-driven_development_php [17/06/2026 09:42] – cyrille | informatique:php:behaviour-driven_development_php [17/06/2026 10:22] (Version actuelle) – [Behat] cyrille | ||
|---|---|---|---|
| Ligne 2: | Ligne 2: | ||
| Le Behaviour-Driven Development ([/ | Le Behaviour-Driven Development ([/ | ||
| + | |||
| + | Le BDD est bien adapté pour les [[/ | ||
| + | * https:// | ||
| **Behat**: Framework BDD le plus connu pour PHP, inspiré de [[https:// | **Behat**: Framework BDD le plus connu pour PHP, inspiré de [[https:// | ||
| Ligne 24: | Ligne 27: | ||
| throw new PendingException(); | throw new PendingException(); | ||
| } | } | ||
| + | </ | ||
| + | |||
| + | Those patterns could be quite powerful, but at the same time, writing them for all possible steps manually could become extremely tedious and boring. | ||
| + | |||
| + | **That’s why Behat does it** for you : | ||
| + | |||
| + | < | ||
| + | --- FeatureContext has missing steps. Define them with these snippets: | ||
| + | |||
| + | # | ||
| + | public function thereIsAWhichCostsPs($arg1, | ||
| + | { | ||
| + | throw new PendingException(); | ||
| + | } | ||
| </ | </ | ||
informatique/php/behaviour-driven_development_php.1781682128.txt.gz · Dernière modification : de cyrille
