So I'm using PHPUnit for testing. Trying to use a DataProvider with one of my tests.
/**
* Tests Events_Event->Events_Event()
* @dataProvider provider
*/
public function testEvents_Event($Name, $param, $time) {
//$this->assertInstanceOf("Events_Event", $this->Events_Event->Events_Event("test2", array()));
$this->assertTrue(true);
}
public static function provider()
{
return array(
array("test", array("Like a boss"), "Cheack the time"),
array("test2", array("Like a boss"), "9:00"),
array("test3", array("Time to go home"), "4:00"),
array("test3", array("Time to go home"), "4:00")
);
}
The results:
testEvents_Event with data set#0
testEvents_Event with data set#1
testEvents_Event with data set#2
testEvents_Event with data set#3: The test case was unexpectedly terminated
This happens on the last data set no matter how many there are and whether or not the last data set is valid of not. As you can see, we've simplified the test to a simple $this->assertTrue(true)
and it's still giving us the error.
What do we need to do to get the Data Provider working?
In case it's important I'm working PHPUnit inside Zend Studio 9.0.3, I've checked for updates and it's telling me all is up to date.