This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
oliverdavies.uk-old-sculpin/source/_talks/test-driven-drupal-simpletest-phpunit.md

1.7 KiB
Raw Blame History

title type slides video tags events
Test Driven Drupal Development with SimpleTest and PHPUnit Talk
url embed
https://speakerdeck.com/opdavies/test-driven-drupal-development-with-simpletest-and-phpunit-drupalcamp-london-17 <script async class="speakerdeck-embed" data-id="4f12722ed400468b93ebb32a23b3c757" data-ratio="1.37081659973226" src="//speakerdeck.com/assets/embed.js"></script>
url embed
https://www.youtube.com/watch?v=fdbxXOi2HP4 <iframe width="560" height="315" src="https://www.youtube.com/embed/fdbxXOi2HP4" frameborder="0" allowfullscreen></iframe>
drupalcamp
simpletest
phpunit
testing
id date time
drupalcamp-london-17 2017-03-04 16:15 - 17:00

Testing is important. Why? It allows developers to add new features and edit and refactor existing code without the worry of adding regressions, reduces the reliance on manual testing to discover bugs, and by taking a test driven approach, your implementation code is leaner as you only write what is needed for your tests to pass.

Drupal 7 includes the SimpleTest module for unit and functional testing, whilst Drupal 8 also includes and supports PHPUnit - the defacto PHP testing framework, used by other PHP projects including Symfony and Laravel - making it easier for people to test their code. And with testing being one of the Drupal core gates with tests needing to be included with every new feature or bug fix, and cores 100% pass rate policy, testing has become an essential skill when contributing to core, or when working on your own projects.

In this talk, well cover the methodology and terminology involved with automated testing, and then take a test driven approach to creating a new Drupal module.