Tests and types

Brent has some thoughts on strong and weakly typed programming languages. Starting point: a simple function that needs testing: rgbToHex(red, green, blue) { // … } Testing the result the function sho…
Brent has some thoughts on strong and weakly typed programming languages. Starting point: a simple function that needs testing: rgbToHex(red, green, blue) { // … } Testing the result the function sho…
In Episode 19 Eric, John, and Oscar record together again to discuss the April 2019 issue on the new frontend fundamentals, php[tek], and quite a lot more about web browsers than anyone anticipated. Topics Eric and John get a look behind the scenes into what goes into producing each magazine issue.…
PHP command-line interface (CLI) includes a nifty option to quickly check for any syntax errors in a source code file. A simple check for a single file is given below. The option flag to check is -l (lowercase ‘L’). $ php -l example.php If the file contains no syntax errors, the CLI returns the fol…
I've always been a heavy IDE user - but for some things, like running tests, I still prefered a terminal. Recently I've played around with the in-IDE possibilities for testing and was pretty satisfied with them. Since Symfony ships with a kinda custom testing experience here's how to setup your IDE…
Today we're going to look at the history and the future of coverage collection in PHP.History is the easy bit: For most of the history of PHP, Xdebug has provided the only implementation to php-code-coverage. Simple.Then in 2015, just after phpdbg was merged into PHP, some clever sausages extended…
Fig 1. A MockingbirdAs well as mentoring and code review one of my main tasks at work is to improve the test suites and improve the testing and development methodologies we use. This is no small task and has resulted in the publication of a few extensions, one of them is uopz.Before we continue; I…