Skip to content

Commit c4d11bb

Browse files
committed
Use assertStringContainsString when needed
1 parent 08985e7 commit c4d11bb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Tests/Fixtures/Resource/.hiddenFile

Whitespace-only changes.

Tests/Util/XmlUtilsTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,28 +24,28 @@ public function testLoadFile()
2424
XmlUtils::loadFile($fixtures.'invalid.xml');
2525
$this->fail();
2626
} catch (\InvalidArgumentException $e) {
27-
$this->assertContains('ERROR 77', $e->getMessage());
27+
$this->assertStringContainsString('ERROR 77', $e->getMessage());
2828
}
2929

3030
try {
3131
XmlUtils::loadFile($fixtures.'document_type.xml');
3232
$this->fail();
3333
} catch (\InvalidArgumentException $e) {
34-
$this->assertContains('Document types are not allowed', $e->getMessage());
34+
$this->assertStringContainsString('Document types are not allowed', $e->getMessage());
3535
}
3636

3737
try {
3838
XmlUtils::loadFile($fixtures.'invalid_schema.xml', $fixtures.'schema.xsd');
3939
$this->fail();
4040
} catch (\InvalidArgumentException $e) {
41-
$this->assertContains('ERROR 1845', $e->getMessage());
41+
$this->assertStringContainsString('ERROR 1845', $e->getMessage());
4242
}
4343

4444
try {
4545
XmlUtils::loadFile($fixtures.'invalid_schema.xml', 'invalid_callback_or_file');
4646
$this->fail();
4747
} catch (\InvalidArgumentException $e) {
48-
$this->assertContains('XSD file or callable', $e->getMessage());
48+
$this->assertStringContainsString('XSD file or callable', $e->getMessage());
4949
}
5050

5151
$mock = $this->getMockBuilder(__NAMESPACE__.'\Validator')->getMock();

0 commit comments

Comments
 (0)