In this blog post, we explore the top source code testing and mock data libraries for PHP. These PHP libraries will help you write unit tests for PHP, simulate real scenarios, and perform mock object dependencies. As always, this list is updated regularly. Email over the URL, if you wish to be included.

Libraries for testing codebases and generating test data.

  • PHPSpec – A design by specification unit testing library.
  • Codeception – A full stack testing framework.
  • Atoum – A simple testing library.
  • Mockery – A mock object library for testing.
  • Phake – Another mock object library for testing.
  • Parody – Yet another mock object library for testing.
  • Faker – A fake data generator library.
  • Samsui – Another fake data generator library.
  • Alice – An expressive fixture generation library.
  • Behat – A Behaviour Driven Development framework.
  • Mink – Web acceptance testing.
  • HTTP Mock – A library for mocking HTTP requests in unit tests.
  • VFS Stream – A virtual filesystem stream wrapper for testing.
  • Travis CI – A continuous integration platform.

Tags: Testing, Unit Testing Framework, ParaTest, parallel testing library, PHPSpec, unit testing library, Codeception, Atoum, testing library, Mockery, mock object library, Phake, Parod, Sismo, Faker, Samsui, Alice, Behat, Mink, HTTP Mock, VFS Stream, Locust, Travis CI

License: Work used under license.