23
I have a testclass in which one test runs multiple times via a @dataProvider and another test that @depends on the first method. However, when I called var_dump on what should be passed to the second test, it gives me a solid NULL, which I didn't expect.
In other words: what should this do:
<?php
class DevicesTest extends PHPUnit_Framework_TestCase
{
/**
* @dataProvider registerDataProvider
*/
public function testRegister($device, $supposedResult)
{
//do a bunch of tests
return array($device, $supposedResult);
}
public function registerDataProvider()
{
return array(array("foo", "foo"));
}
/**
* @depends testRegister
*/
public function testSaveDevicePreferences($deviceArr)
{
$this->assertNotEmpty($deviceArr);
}
}
?>