1.1 --- a/lib.php Fri Jun 19 20:43:13 2009 +0200
1.2 +++ b/lib.php Fri Jun 19 20:47:20 2009 +0200
1.3 @@ -83,7 +83,13 @@
1.4 public function getForGazelle()
1.5 {
1.6
1.7 - return implode(', ', $this->artists->getItems());
1.8 + return implode(', ', $this->getArtists());
1.9 + }
1.10 +
1.11 + public function getArtists()
1.12 + {
1.13 +
1.14 + return ($this->artists->getItems());
1.15 }
1.16
1.17 public function addArtist($artist)
2.1 --- a/test.php Fri Jun 19 20:43:13 2009 +0200
2.2 +++ b/test.php Fri Jun 19 20:47:20 2009 +0200
2.3 @@ -41,3 +41,12 @@
2.4
2.5 $am->excludeArtists('azok, cat,,aegrohj ');
2.6 test($am->getForGazelle(), 'aplurf, blorf, cats, lol, lolcat, lulz, mlurf, ZÉÉÉ');
2.7 +
2.8 +
2.9 +$am = new ArtistsManager();
2.10 +$am->addArtist(' ');
2.11 +test(count($am->getArtists()), 0);
2.12 +$am->addArtist('lolcat');
2.13 +test(count($am->getArtists()), 1);
2.14 +$am->removeArtist(' LoLcAt ');
2.15 +test(count($am->getArtists()), 0);