Skip to content

Commit

Permalink
Use assertStringContainsString when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
jderusse committed Aug 6, 2019
1 parent 2724c44 commit 5d61fdb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Tests/Command/LintCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function testLintIncorrectFile()
$ret = $tester->execute(['filename' => $filename], ['decorated' => false]);

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

public function testConstantAsKey()
Expand Down
2 changes: 1 addition & 1 deletion Tests/InlineTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public function testDumpNumericValueWithLocale()
}

$this->assertEquals('1.2', Inline::dump(1.2));
$this->assertContains('fr', strtolower(setlocale(LC_NUMERIC, 0)));
$this->assertStringContainsStringIgnoringCase('fr', setlocale(LC_NUMERIC, 0));
} finally {
setlocale(LC_NUMERIC, $locale);
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/ParserTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function testSpecifications($expected, $yaml, $comment, $deprecated)
restore_error_handler();

$this->assertCount(1, $deprecations);
$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]);
$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]);
}
}

Expand Down

0 comments on commit 5d61fdb

Please sign in to comment.