Tag: phpt

  • PHP TestFest 2008

    PHP.net has posted a nice overview of the PHP TestFest 2008 initiative, which aims to increase the PHP source code coverage through PHPT tests. Worldwide, the TestFest was carried out with different user groups, and of course the PHPBelgium and phpGG were also present. We arranged a meetup in Roosendaal earlier this year and with […]

  • Generating PHP test coverage and ccache

    Today I had a weird error while generating PHP code coverage for PHPT tests. If you’re writing PHP extensions, it’s quite common to use compiler caches like ccache. They cache compile results in a way that speeds up multiple compilation of the same source, something which happens quite a lot if you’re working on coding […]

  • Testing Databases, streams and files with PHPT

    Writing PHPT tests is pretty easy to learn. Basically, you execute php code, and define what output is expected from the code. That’s fine for testing string manipulating functions or some other basic function, but what do you do if databases or streams need to be tested? What if you need files or directories to […]

  • PHPT (testfest) writing resources

    The PHP TestFest month is almost over and we can already probably say it was quite a success. Of course it would be great if some of the test writers continue to occasionally write a new test or two, and for this occasion, I thought it would be handy to have a resource listing of […]

  • Standard core PHP 5.3 extensions

    When writing PHPT tests for PHP, it’s good practice to have a conditional –SKIPIF– block to see if the test can be skipped when some extension you’re testing isn’t available. With the PHP_5_3 CVS branch (the one you should be testing against), some new extensions can’t be disabled, so the –SKIPIF– block isn’t needed anymore. […]

  • Writing PHPT tests on your mac

    This is a short tutorial on how to set up a Mac with Mac OS X to prepare for writing PHPT tests. This preparation includes installing some extra software that enables you to checkout and compile the PHP_5_3 branch of the PHP source without problems. Furthermore we’ll install some tools that make it possible to […]