/** * Validate that the new date format works as expected * @param string $instr input date/time * @param bool $oldformats whether it supports old formats * @param bool $inctime whether it supports additional time info * @param int $minyear the minimum year allowed * @param int $maxyear the maximum year allowed * @param mixed $expected the expected output from parse_date() method given the above parameters * @dataProvider pddataprovider */ public function test_version1elisparsedate($instr, $oldformats, $inctime, $minyear, $maxyear, $expected) { if (is_array($expected)) { $expected = call_user_func_array('rlip_timestamp', $expected); } $plugin = new rlip_importplugin_version1elis(); $timestamp = $plugin->parse_date($instr, $oldformats, $inctime, $minyear, $maxyear); $this->assertEquals($expected, $timestamp); }