Unit testing with @dataProvider isn't working


I just started using PHPUnit testing on my project and am stumped when using @dataProvider. Let’s say one of my models is:

class MyClass extends CActiveRecord



    public function dummy($a, $b, $c)


        return array($a, $b, $c);



Then the unit test could be:

class MyClassTest extends CDbTest


    public static function provider()


        return array(





     * @dataProvider provider


    public function testDummy($a, $b, $c)


        echo $a.' - '.$b.' - '.$c;




However, when I run [font="Courier New"]$phpunit unit/MyClassTest.php[/font] I get:

PHPUnit 3.5.13 by Sebastian Bergman

 - - .

Time 0 seconds, memory 6.25 MB.

OK (1 test, 1 assertion)

Now I’ve tried more sophisticated tests with the same result. It seems that the @dataProvider annotation is ignored (I don’t know whether it’s Yii or PHPUnit) because on all tests where I’ve hardcoded the test data, it seems to work. Any ideas? Thanks in advance.

Well, I must have had an invisible garbage character in my file because I retyped the whole thing from scratch and it worked.