From the course: PHP: Test-Driven Development with PHPUnit

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

What is unit testing?

What is unit testing? - PHP Tutorial

From the course: PHP: Test-Driven Development with PHPUnit

Start my 1-month free trial

What is unit testing?

- [Instructor] This course covers the basics of writing unit test in PHP with the testing framework PHPUnit. Let's start with the basics. What is unit testing? A classic definition of unit testing, from automated defect prevention, states that unit testing is a software testing method by which individual units of source code, sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures are tested to see determine whether they are fit for use. So that's a pretty long definition. Let's break this down a bit so we understand it better. Unit testing is more generally the idea of testing isolated units of code to ensure the code meets some parameters. Typically that it correctly performs as expected. When we talk about an isolated unit of code, we're typically talking about a single function or method, the smallest unit of code that can be independently run and operated. Test driven development means different things to…

Contents