public function canParse(string $file) : bool { if (false === stream_is_local($file)) { return false; } return 1 === preg_match(self::REGEX, $file); }
/** * @dataProvider provideUnsupportedList */ public function testCannotParseUnsupportedFiles(string $file) { $actual = $this->parser->canParse($file); $this->assertFalse($actual); }