@@ -123,7 +123,7 @@ public function testIgnoreErrorByPathAndCountMoreThanExpected(bool $onlyFiles):
123
123
$ this ->assertInstanceOf (Error::class, $ result [2 ]);
124
124
$ this ->assertStringContainsString ('Ignored error pattern #Fail\.# ' , $ result [2 ]->getMessage ());
125
125
$ this ->assertStringContainsString ('is expected to occur 1 time, but occured 3 times. ' , $ result [2 ]->getMessage ());
126
- $ this ->assertSame (6 , $ result [2 ]->getLine ());
126
+ $ this ->assertSame (5 , $ result [2 ]->getLine ());
127
127
$ this ->assertSamePaths (__DIR__ . '/data/two-fails.php ' , $ result [2 ]->getFile ());
128
128
}
129
129
@@ -142,9 +142,11 @@ public function testIgnoreErrorByPathAndCountLessThanExpected(bool $onlyFiles):
142
142
];
143
143
$ result = $ this ->runAnalyser ($ ignoreErrors , true , __DIR__ . '/data/two-fails.php ' , $ onlyFiles );
144
144
$ this ->assertCount (1 , $ result );
145
- $ this ->assertIsString ($ result [0 ]);
146
- $ this ->assertStringContainsString ('Ignored error pattern #Fail\.# ' , $ result [0 ]);
147
- $ this ->assertStringContainsString ('is expected to occur 4 times, but occured only 3 times. ' , $ result [0 ]);
145
+ $ this ->assertInstanceOf (Error::class, $ result [0 ]);
146
+ $ this ->assertStringContainsString ('Ignored error pattern #Fail\.# ' , $ result [0 ]->getMessage ());
147
+ $ this ->assertStringContainsString ('is expected to occur 4 times, but occured only 3 times. ' , $ result [0 ]->getMessage ());
148
+ $ this ->assertSamePaths (__DIR__ . '/data/two-fails.php ' , $ result [0 ]->getFile ());
149
+ $ this ->assertSame (5 , $ result [0 ]->getLine ());
148
150
}
149
151
150
152
public function testIgnoreErrorByPathAndCountMissing (): void
0 commit comments