PHPUnit

Writing unit tests with PHP

Description

Everyone tells you that you need to test. You know the theory, but you don't know where to begin. What to test? What cases to write? PHPUnit is a testing framework for PHP that offers many ways to automate testing. Through realistic and pragmatic examples, this presentation will take you away from echo or var_dump and ease you into the testing business.

Objectives

  • Increase the quality of PHP applications.
  • Increase confidence in the code before deployment.

Prerequisites

  • Experience in PHP development

Programme

  • Manual vs automated tests.
  • Writing and executing unit tests.
  • The three steps towards TDD.
  • Mocking.
  • Creating realistic and relevant scenarios.
  • Organizing the test suite.
  • Metrics and code coverage.
  • Continuous Integration.