TDD done right

The culture of test-driven development is not new. Rather, it has been around even before Kent Beck wrote SUnit in the 1990's. The xUNIT family of unit testing frameworks, which stemmed from SUnit, has grown to provide a testing solution for PHP.

PHPUnit

The PHP port of the PHP testing software is named PHPUnit. Yet, test-driven development in the PHP language is a fairly recent concept. For example, in his book, "The Grumpy Programmer's Guide To Building Testable PHP Applications", which was published at the end of 2012, Chris Hartjes wrote "I started looking into the culture of testing surrounding CodeIgniter. It's weaker than a newborn baby."

Testing has been a part of the Laravel framework since version 3 that uses the PHPUnit unit-testing tool, and therefore Laravel's inclusion of the phpunit.xml file was a huge leap forward in the effort to encourage developers to embrace test-driven development.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset