PHPUnit In And With Drupal 8: No Unit Left Behind

Drupal 8 now ships with PHPUnit included. What does that mean? It means we can write super-fast unit tests that enable test-driven development practices and higher-quality code.

If you're wondering, "What do you mean by 'unit?'" then this talk is for you.

Some things you're likely to learn during this talk:

  • Why you should write tests
  • Brief overview of testing strategies: Behavioral, functional, and unit testing
  • How to run PHPUnit in Drupal 8 (Using Testing module and from the command line)
  • How to generate a coverage report
  • What you can learn from coverage reports
  • Drupal 8 file location standards for PHPUnit, so you can write tests for your contrib module

We'll be walking through the PHPUnit Example, from the Examples for Developers project. It's not complete at this time, but here's the issue: https://drupal.org/node/2032697

Things I'll end up talking about, but which I'd really rather not spend much time on:

  • Namespaces
  • PSR-0
  • General knowledge of OOP in PHP
  • How the command line works

Files

AttachmentSize
PHPUnit_Drupal8_BADCamp_Oct2013.pdf135.64 KB

Sorry the video will not be available for this session. :(

Saturday, Oct 26th
10:00am - 10:45am

Speaker(s)

Skill Level