Spick And Span PHPUnit Tests Using Data providers


Writing PHPUnit tests to test individual components of an application often helps in ensuring the deployment of the desired features. But sometimes writing tests in the real world can become chaotic, Especially when developers try to cover all the edge cases in tests by providing dummy input data.

These edge cases often result in hundreds of lines of repetitive code throughout your application. Thankfully, PHPUnit understands this problem and allows to solve it by providing a layer of abstraction through which developers can abstract their tests from the dummy data.

In this session, We will be looking at this quick demo that covers:
* A test that is functional, But is messy.
* What is "PHPUnit Data Providers"?
* A test showcasing data abstraction using PHPUnit Data Providers.

Even though the motives behind writing automated tests are good, They sometimes produce code that does not showcase quality and maintainability. And, By the help of this session you can learn how to write quality code which can be easily maintained.


makers & builders


back-end development

When & Where

Thursday, 7 October, 2021 - 09:30 to 09:50
Hopin - Room 4