/** * @param string $invalidFile * @param $newVersion * * @dataProvider invalidFilesProvider * @expectedException RuntimeException */ public function testMustThrowException($invalidFile, $newVersion) { $tmpFile = $this->tmp . '/' . uniqid('pdf_version_changer_test_') . '.pdf'; $command = new GhostscriptConverterCommand(); $command->run($invalidFile, $tmpFile, $newVersion); $guesser = new RegexGuesser(); $version = $guesser->guess($tmpFile); $this->assertEquals($version, $newVersion); }
/** * @param string $file * * @dataProvider invalidFilesProvider * @expectedException RuntimeException */ public function testMustThrowException($file) { $guesser = new RegexGuesser(); $version = $guesser->guess($file); }