Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Writing Tests For PHP Source - Northeast PHP 2017

Writing Tests For PHP Source - Northeast PHP 2017

Talk given at Northeast PHP on August 8, 2017.

As you might have already heard from a grumpy individual, adding more tests to your codebase is crucial to its stability over time. This talk isn't about adding tests to your PHP codebase, but adding tests to the PHP language itself. And the best part is, all the tests are written in PHP so you don't even have to dust off that old C book from college.

In this talk I will show you how to find untested parts of the PHP source code, how to write a test for the untested feature and how to submit your tests to PHP internals. Not only will you be making PHP more stable and reliable, but there's a good chance the tests you write will give you a deeper understanding of PHP; knowledge you can use to improve your own codebases. Not to mention you'll be able to call yourself an internals contributor. Come on in! The water's fine!

Sammy Kaye Powers

August 11, 2017
Tweet

More Decks by Sammy Kaye Powers

Other Decks in Programming

Transcript

  1. $ less test-dt.diff 001+ Boy you know I'm from Europe/Oslo

    001- Boy you know I'm from America/Chicago
  2. joind.in/talk/7c85b @SammyK #nephp17 $ less ext/readline/tests/readline_basic.out Fatal error: Uncaught Error:

    Call to undefined function readline() in /Users/SammyK/Developer/php-src/ ext/readline/tests/ readline_basic.php:2