Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

thePHP.cc:
Migrating to PHPUnit 6
Feb 03, 2017 @ 09:07:28

On thePHP.cc site there's a new post sharing what you need to know about migrating your PHPUnit installation up to PHPUnit 6 from previous versions.

The first version of PHPUnit 6 was released today. Today also marks the End of Life of PHPUnit 4. What does this mean for you? The answer to this question depends on which versions of PHP and PHPUnit you currently use.

They break the reminder of the article down into three sections:

  • what you'll need to change to update from PHPUnit 4
  • what you'll need to change to update from PHPUnit 5
  • what kinds of things come with PHPUnit 6 that "you'll want to use"

This last section includes updates like the changes to namespacing, having "risky" test checking enabled by default, deprecated APIs and the ability to export a log file JUnit will understand.

tagged: migrate phpunit6 tutorial phpunit4 phpunit5 features updates

Link: https://thephp.cc/news/2017/02/migrating-to-phpunit-6

SitePoint PHP Blog:
An Overview of PHPUnit 5 – What’s New? What’s Coming?
May 10, 2016 @ 09:24:37

On the SitePoint PHP blog there's an article posted talking about the next major version of the PHPUnit unit testing tool - PHPUnit 5. It talks about what's new, what's changed and what has been added to help make your testing more effective.

It was January 2016 when the PHPUnit development team [announced](https://github.com/sebastianbergmann/phpunit/wiki/Release-Announcement-for-PHPUnit-5.0.0) the release of PHPUnit 5.0.

While several minor version have already been released since, PHPUnit’s major version 5 has introduced several new functionalities and deprecated a few others. In this article, we’ll take a look at the most notable changes.

Included in the list of changes the article mentions are things like:

  • the bump up the minimum PHP version requirements (5.6+)
  • new assertion methods
  • deep object cloning
  • passing mocks along with expectations

Several more are included and, with each some code examples or links to other resources for more information.

tagged: phpunit5 overview preview release features changes update

Link: http://www.sitepoint.com/an-overview-of-phpunit-5-whats-new-whats-coming/

ThePHP.cc:
PHPUnit 4.7 and Three Shades of Green
Jun 08, 2015 @ 12:57:25

Sebastian Bergmann has posted a guide to PHPUnit 4.7 and some of the changes/new features it introduces.

PHPUnit 4.7 introduces a couple of small improvements. For instance, PHPUnit's PHPT test runner now supports --INI-- sections, information about the PHP runtime used is now printed in verbose mode, and a warning is now printed when code coverage data is collected but no whitelist is configured.

He also talks about the support that's been added improving the output of the HTML version of the code coverage reports, showing different colors based on how well covered the lines are. He also briefly looks ahead to PHPUnit 5, the versions it will support and the plans for release.

tagged: phpunit unittest v47 small medium large coverage shade phpunit5

Link: https://thephp.cc/news/2015/06/phpunit-4-7-and-three-shades-of-green