Spick And Span PHPUnit Tests Using Data providers

kunalkursija

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.

Track

makers & builders

Tags

architecture
testing
back-end development

When & Where

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