ReflectionException: Method PHPUnit_Framework_Warning::Warning() does not exist

Flattr this
Tweet this: ReflectionException: Method PHPUnit_Framework_Warning::Warning() does not exist
Dent this: ReflectionException: Method PHPUnit_Framework_Warning::Warning() does not exist
Datum: 30.11.2011 19:59:38
If you ever get
ReflectionException: Method PHPUnit_Framework_Warning::Warning() does not exist
That may be because you are using @dataProvider and your dataProvider returns the data in an invalid way. This may be caused by forgetting one dimension in the returned array when using only a single value as parameter for the test. Wrong:
<?php

public function myDataProvider()
{
    $data = array();

    $data[] = 'some value i want to pass as param';
    $data[] = 'another value i want to pass as param';

    return $data;
}
Right:
<?php

public function myDataProvider()
{
    $data = array();

    $data[] = array('some value i want to pass as param');
    $data[] = array('another value i want to pass as param');

    return $data;
}

Trackbacks (0)

Trackbackurl: http://www.robo47.net/trackback/blogentry/213

Es sind keine Trackbacks vorhanden.


Kommentare (0)

Es sind noch keine Kommentare vorhanden.

Die Kommentare zu diesem Beitrag sind gesperrt.

You liked it ? Link it on your homepage or blog: