Skip to content

Commit

Permalink
Merge branch '3.4' into 4.3
Browse files Browse the repository at this point in the history
* 3.4:
  bump phpunit-bridge cache-id
  Use assertStringContainsString when needed
  Use assert assertContainsEquals when needed
  Use assertEqualsWithDelta when required
  • Loading branch information
nicolas-grekas committed Aug 6, 2019
2 parents 1e5946f + c4d11bb commit 28e7bab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Empty file.
8 changes: 4 additions & 4 deletions Tests/Util/XmlUtilsTest.php
Expand Up @@ -24,28 +24,28 @@ public function testLoadFile()
XmlUtils::loadFile($fixtures.'invalid.xml');
$this->fail();
} catch (\InvalidArgumentException $e) {
$this->assertContains('ERROR 77', $e->getMessage());
$this->assertStringContainsString('ERROR 77', $e->getMessage());
}

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

try {
XmlUtils::loadFile($fixtures.'invalid_schema.xml', $fixtures.'schema.xsd');
$this->fail();
} catch (\InvalidArgumentException $e) {
$this->assertContains('ERROR 1845', $e->getMessage());
$this->assertStringContainsString('ERROR 1845', $e->getMessage());
}

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

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

0 comments on commit 28e7bab

Please sign in to comment.