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:
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.
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.
Finally, we create acceptance tests to see if the tests created from the first two steps satisfy the application performance from the end user's point of view. In this step, we see the results in a browser, and we can see how our application interacts with JavaScript codes...