You can use the so-called data provider . Like this:
/** * @dataProvider providerPersonData */ public function testPerson($name, $age) { // test something ... } public function providerPersonData() { // test with this values return array( array('foo', 36), array('bar', 99), // ... ); }
You define the data provider using the @dataProvider annotation.
source share