minor #26421 [Config] Add characters to the regex (DavidPrevot)

This PR was merged into the 3.4 branch.

Discussion
----------

[Config] Add characters to the regex

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| License       | MIT

Commits
-------

dff88d44be [Config] Add characters to the regex
This commit is contained in:
Fabien Potencier 2018-03-13 07:27:50 -05:00
commit ebfcab3759

View File

@ -55,7 +55,7 @@ class XmlUtilsTest extends TestCase
XmlUtils::loadFile($fixtures.'valid.xml', array($mock, 'validate'));
$this->fail();
} catch (\InvalidArgumentException $e) {
$this->assertRegExp('/The XML file "[\w:\/\\\.-]+" is not valid\./', $e->getMessage());
$this->assertRegExp('/The XML file "[\w:\/\\\.~+-]+" is not valid\./', $e->getMessage());
}
$this->assertInstanceOf('DOMDocument', XmlUtils::loadFile($fixtures.'valid.xml', array($mock, 'validate')));