merged branch hason/bc_xml (PR #6393)

This PR was submitted for the master branch but it was merged into the 2.2 branch instead (closes #6393).

Commits
-------

697d53d [Router] Fixed XmlFileLoaderTest::testLoadThrowsExceptionWithInvalidFileEvenWithoutSchemaValidation

Discussion
----------

[Router] Fixed test
This commit is contained in:
Fabien Potencier 2013-02-11 12:24:47 +01:00
commit 95afd69a0e

View File

@ -12,14 +12,15 @@
namespace Symfony\Component\Routing\Tests\Fixtures; namespace Symfony\Component\Routing\Tests\Fixtures;
use Symfony\Component\Routing\Loader\XmlFileLoader; use Symfony\Component\Routing\Loader\XmlFileLoader;
use Symfony\Component\Config\Util\XmlUtils;
/** /**
* XmlFileLoader with schema validation turned off * XmlFileLoader with schema validation turned off
*/ */
class CustomXmlFileLoader extends XmlFileLoader class CustomXmlFileLoader extends XmlFileLoader
{ {
protected function validate(\DOMDocument $dom) protected function loadFile($file)
{ {
return true; return XmlUtils::loadFile($file, function() { return true; });
} }
} }