TDD and BDD with Codeception

Now is a good opportunity to see Codeception and our understanding of TDD and BDD in action. To implement a maintainable code, we are going to follow these three steps:

  1. First, we create a failing functional test (a scenario) that summarizes our expectations of the application. This means that according to the business logic, we need to see an overall function related to each entity. So we will create actions that, without worrying about what they will have inside, simply return a desired response.
  2. Next, we create a failing unit test and assess the legitimacy of the response created from step one. In other words, we test the logic in each action to make sure that the generated response is accurate.
  3. Finally, we create acceptance ...

Get Mastering Symfony now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.