Skip to content

Commit 5d61fdb

Browse files
committed
Use assertStringContainsString when needed
1 parent 2724c44 commit 5d61fdb

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Tests/Command/LintCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function testLintIncorrectFile()
4848
$ret = $tester->execute(['filename' => $filename], ['decorated' => false]);
4949

5050
$this->assertEquals(1, $ret, 'Returns 1 in case of error');
51-
$this->assertContains('Unable to parse at line 3 (near "bar").', trim($tester->getDisplay()));
51+
$this->assertStringContainsString('Unable to parse at line 3 (near "bar").', trim($tester->getDisplay()));
5252
}
5353

5454
public function testConstantAsKey()

Tests/InlineTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function testDumpNumericValueWithLocale()
132132
}
133133

134134
$this->assertEquals('1.2', Inline::dump(1.2));
135-
$this->assertContains('fr', strtolower(setlocale(LC_NUMERIC, 0)));
135+
$this->assertStringContainsStringIgnoringCase('fr', setlocale(LC_NUMERIC, 0));
136136
} finally {
137137
setlocale(LC_NUMERIC, $locale);
138138
}

Tests/ParserTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function testSpecifications($expected, $yaml, $comment, $deprecated)
5858
restore_error_handler();
5959

6060
$this->assertCount(1, $deprecations);
61-
$this->assertContains(true !== $deprecated ? $deprecated : 'Using the comma as a group separator for floats is deprecated since Symfony 3.2 and will be removed in 4.0 on line 1.', $deprecations[0]);
61+
$this->assertStringContainsString(true !== $deprecated ? $deprecated : 'Using the comma as a group separator for floats is deprecated since Symfony 3.2 and will be removed in 4.0 on line 1.', $deprecations[0]);
6262
}
6363
}
6464

0 commit comments

Comments
 (0)