Use data provider to supply test values

Alongside the issue about tackling the empty list case first, I generally like to build up the data set that I'm using for testing to try out the different cases I can think of (1 elements, repeated elements, all elements are zero, etc.).

This illustrates using PHPUnit's Data Providers to do that: http://www.phpunit.de/manual/3.2/en/writing-tests-for-phpunit.html#writing-tests-for-phpunit.data-providers