/** * @param string $file * @dataProvider wordsDataProvider */ public function testWords($file) { $words = self::$_wordsFinder->findWords($file); if ($words) { $this->fail("Found words: '" . implode("', '", $words) . "' in '{$file}' file"); } }
/** * @param string $file * @dataProvider wordsDataProvider */ public function testWords($file) { $words = self::$_wordsFinder->findWords($file); if ($words) { $this->fail('Found words: ' . implode(', ', $words)); } }
/** * @param string|array $configFiles * @param string $file * @param array $expected * @dataProvider findWordsDataProvider */ public function testFindWords($configFiles, $file, $expected) { $wordsFinder = new Inspection_WordsFinder($configFiles, __DIR__ . '/_files/words_finder'); $actual = $wordsFinder->findWords($file); $this->assertEquals($expected, $actual); }