Quote for the day

I’m reading this and I liked this:

The obvious skill I learned was how to write tests using a fancy testing framework, but the meta-thing I learned which has been even more useful is the fact that writing a test-case generator and a checker is often much more productive than the manual test-case writing that passes for automated testing in most places.

Also good:

It’s not that these books aren’t useful, it’s that almost all of them are written to make sense without any particular background beyond what any random programmer might have, and you can only get so much out of reading your 50th book targeted at random programmers.

PHPUnit Skeleton Generator

Today I installed PHPUnit Skeleton Generator like this:

 $ vim ~/.composer/composer.json

Added:

 "minimum-stability": "dev"

 $ composer global require 'phpunit/phpunit-skeleton-generator=*'

But… then it turned out that the interface was broken when invoking from NetBeans, so over here:

$ pear channel-discover components.ez.no
$ pear install phpunit/PHPUnit_SkeletonGenerator

Then I created a phpunit-skelgen.php file in my project and added:

#!/usr/bin/php
<?php

require_once '/usr/share/php/SebastianBergmann/PHPUnit/SkeletonGenerator/autoload.php';
require_once '/usr/share/php/SebastianBergmann/PHPUnit/SkeletonGenerator/Command.php';

SebastianBergmann\PHPUnit\SkeletonGenerator\Command::main();

Simple! :)