Skip to main content

Drupal Unit Testing / TDD course with PHPUnit

We will give a review of the different tests that can be integrated into PHP using the PHPUnit Framework. Discovering what needs to be covered at the lower levels of development and how to execute them.

Course duration

The course has a duration of 5 hours of training. This course can be complemented with practical cases in workshop mode in subsequent days on projects indicated by the applicant.


  • Knowledge of PHP (medium)
  • Knowledge of Object Orientation (medium)
  • Terminal handling (basic)
  • Have PHP / Composer installed
  • Have an IDE installed (PHPStorm, Netbeans, Visual Studio Code)

Course content

  1. Introduction
  2. Local work environment setup
    1. Composer
    2. IDE Configuration
  3. Fundamentals
    1. Introduction to assertions
    2. Using multiple Assertions
    3. Correcting Bugs through Testing
    4. Naming Conventions and Standards
  4. PHPUnit XML configuration
  5. Test dependencies, Fixtures and Exceptions
    1. Dependencies between tests
    2. SetUp and TearDown
    3. Text Fixture
    4. Exceptions Test
  6. Mocks and Stubs
    1. Creating mock objects to avoid external dependencies
    2. Dependency Injection
    3. Mockery - Framework
  7. TDD - Test Driven development
    1. Writing test before code
    2. Targeted development test
    3. Code refactor with tests
  8. Advanced test
    1. Protected / private methods
    2. Attributes & nbsp; protected / private
    3. Static methods
  9. Conclusions
Write your message here...
I have read and I agree to the privacy policy.