jeremykendall/12-tdds-of-christmas — pull request #2 by rowan-m (2013-01-01 15:53:22+00:00)
Title: 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