Hey all,
I'm looking to run a bunch of tests with one object with different parameters in the setUp function.
How do I do this? I tried using the @dataProvider, but that doesn't work with setUp I quickly found out..
Here's what I'd like to do (using @dataProvider):
/*
* @dataProvider provider
*/
function setUp($namespace, $args) {
$this->tag = new Tag($namespace, $args);
}
function provider() {
return array(
array('hello', array()),
array('world', array())
);
}
function testOne() {
}
function testTwo() {
}
The result is that testOne() and testTwo() are run against an object with the namespace "hello" and an object with the namespace "world"
Any help would be greatly appreciated!
Thanks, Matt