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 | |
|---|---|---|---|---|---|
|
Sep 17, 2010 | French | Online | 60.00 € | Register |
|
|||||
|
Sep 24, 2010 | English | Online | 60.00 € | Register |
|
|||||
|
Oct 15, 2010 | French | Online | 60.00 € | Register |
|
|||||
|
Oct 21, 2010 | English | Online | 60.00 € | Register |
|
|||||
|
Oct 29, 2010 | French | Online | 60.00 € | Register |
|
|||||
|
Nov 12, 2010 | French | Online | 60.00 € | Register |
|
|||||
|
Nov 18, 2010 | English | Online | 60.00 € | Register |
|
|||||
|
Dec 9, 2010 | English | Online | 60.00 € | Register |
|
|||||
|
Dec 10, 2010 | French | Online | 60.00 € | Register |
|
|||||
|
Dec 24, 2010 | French | Online | 60.00 € | Register |
|
|||||
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 PDFIntroduction 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
- 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
- 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()andtearDown()methods - Write unit tests for methods, which can handle exceptions
- Testing exception with the
setExpectedException()assertion method - Testing exception by using the
@expectedExceptionannotation - Testing exception thanks to a
try { } catchcode block - Lab: implement unit tests for a method that can throw an exception
- 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
- 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
- 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
Write your first assertions
Init and reset a test
Testing exceptions
Test Driven Development
Data providers and fixtures
Advanced assertions
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


