Onsite training

Bring our trainers team onsite to train your employees.

Learn more


PHP

Getting started with PHPUnit

Getting started with unit tests and the test driven development methodology thanks to the PHPUnit framework.


This online training invites you to discover the basics of unit testing with PHPUnit famework.

Coming sessions


Infos Date Language Venue Price  
Infos Sep 17, 2010 French Online 60.00 € Register
  • This session will take place on September 17, 2010 from 9:00 AM to 12:00 PM (Europe/Paris) and it will be hosted by Hugo Hamon.

Infos Sep 24, 2010 English Online 60.00 € Register
  • This session will take place on September 24, 2010 from 9:00 AM to 12:00 PM (America/Chicago) and it will be hosted by Jonathan Wage.

Infos Oct 15, 2010 French Online 60.00 € Register
  • This session will take place on October 15, 2010 from 9:00 AM to 12:00 PM (Europe/Paris) and it will be hosted by Hugo Hamon.

Infos Oct 21, 2010 English Online 60.00 € Register
  • This session will take place on October 21, 2010 from 9:00 AM to 12:00 PM (America/Chicago) and it will be hosted by Jonathan Wage.

Infos Oct 29, 2010 French Online 60.00 € Register
  • This session will take place on October 29, 2010 from 9:00 AM to 12:00 PM (Europe/Paris) and it will be hosted by Hugo Hamon.

Infos Nov 12, 2010 French Online 60.00 € Register
  • This session will take place on November 12, 2010 from 9:00 AM to 12:00 PM (Europe/Paris) and it will be hosted by Hugo Hamon.

Infos Nov 18, 2010 English Online 60.00 € Register
  • This session will take place on November 18, 2010 from 9:00 AM to 12:00 PM (America/Chicago) and it will be hosted by Jonathan Wage.

Infos Dec 9, 2010 English Online 60.00 € Register
  • This session will take place on December 9, 2010 from 9:00 AM to 12:00 PM (America/Chicago) and it will be hosted by Jonathan Wage.

Infos Dec 10, 2010 French Online 60.00 € Register
  • This session will take place on December 10, 2010 from 9:00 AM to 12:00 PM (Europe/Paris) and it will be hosted by Hugo Hamon.

Infos Dec 24, 2010 French Online 60.00 € Register
  • This session will take place on December 24, 2010 from 9:00 AM to 12:00 PM (Europe/Paris) and it will be hosted by Hugo Hamon.


Goals


  • During 3 hours, you will learn how to install PHPUnit and write your first unit tests suites thanks to a test driven development approach.

Program

Download the program as PDF

Introduction to unit test

  • What are unit tests?
  • Pros and cons
  • The FIRST rule

Introduction to PHP Unit

  • Introduction to PHP Unit
  • Open Source PHP projects use PHP Unit
  • IDEs integration
  • PHPUnit installation from PEAR
  • Lab: Install PHPUnit with PEAR
    • Write your first assertions

      • Discover the PHPUnit_Framework_TestCase API
      • Introduction to the Command Line Interface
      • Write a first tests suite
      • Run the test suite from the command line tool
      • Lab: Write and run a PHPUnit tests suite from the command line

      Init and reset a test

      • Setup a tests suite with the setup() method
      • Reset a testing environment with the tearDown() method
      • Introduction to fixtures
      • Lab: setup and reset a tests suite with setup() and tearDown() methods

      Testing exceptions

      • Write unit tests for methods, which can handle exceptions
      • Testing exception with the setExpectedException() assertion method
      • Testing exception by using the @expectedException annotation
      • Testing exception thanks to a try { } catch code block
      • Lab: implement unit tests for a method that can throw an exception

      Test Driven Development

      • Understanding the test driven development (TDD) methodology
      • Main advantages of the TDD approach
      • Implement code thanks to a test driven development approach
      • Lab: fix and document a bug thanks to a TDD approach

      Data providers and fixtures

      • Understanding the data providers and fixtures concepts
      • Create a new data provider method to run a test with several values
      • Lab: implement a data provider method to test a method's edge cases

      Advanced assertions

      • Discover some PHPUnit's advanced assertion methods
      • Assertions to test a class and its attributes
      • Assertions to test Boolean values
      • Assertions to test string values
      • Assertions to test XML values

Session details


Price

Starts at 35.00 €

Audience

PHP Developpers

Duration

3 hours

Training type

Elearning

Topics

Unit testing, best practices, PHPUnit, installation, assertions

Pre-requisites

PHP and object oriented programming


For further information

+33 1 40 99 81 09

We remain at your disposal for further information.
Contact us