File tree Expand file tree Collapse file tree 1 file changed +3
-18
lines changed
tests/Sniffs/ControlStructures Expand file tree Collapse file tree 1 file changed +3
-18
lines changed Original file line number Diff line number Diff line change @@ -11,27 +11,12 @@ public function testCorrectFile()
1111 $ this ->assertNoSniffErrorInFile ($ resultFile );
1212 }
1313
14- /**
15- * @return int[][]
16- */
17- public function dataIncorrectFile (): array
14+ public function testIncorrectFile ()
1815 {
19- $ lineNumbers = [] ;
16+ $ resultFile = $ this -> checkFile ( __DIR__ . ' /data/allYodaComparisons.php ' ) ;
2017 foreach (range (3 , 33 ) as $ lineNumber ) {
21- $ lineNumbers [ $ lineNumber ] = [ $ lineNumber] ;
18+ $ this -> assertSniffError ( $ resultFile , $ lineNumber, YodaComparisonSniff:: CODE_YODA_COMPARISON ) ;
2219 }
23-
24- return $ lineNumbers ;
25- }
26-
27- /**
28- * @dataProvider dataIncorrectFile
29- * @param int $lineNumber
30- */
31- public function testIncorrectFile (int $ lineNumber )
32- {
33- $ resultFile = $ this ->checkFile (__DIR__ . '/data/allYodaComparisons.php ' );
34- $ this ->assertSniffError ($ resultFile , $ lineNumber , YodaComparisonSniff::CODE_YODA_COMPARISON );
3520 }
3621
3722 public function testFixable ()
You can’t perform that action at this time.
0 commit comments