/** * @dataProvider validateProvider */ public function testValidate() { if (func_num_args() > 2) { $this->object->setParameter(func_get_arg(2)); } list($value, $expected) = func_get_args(); $this->assertEquals($expected, $this->object->validate($value)); }