* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Config\Tests\Definition\Dumper; use PHPUnit\Framework\TestCase; use Symfony\Component\Config\Definition\Dumper\XmlReferenceDumper; use Symfony\Component\Config\Tests\Fixtures\Configuration\ExampleConfiguration; class XmlReferenceDumperTest extends TestCase { public function testDumper() { $configuration = new ExampleConfiguration(); $dumper = new XmlReferenceDumper(); $this->assertEquals($this->getConfigurationAsString(), $dumper->dump($configuration)); } public function testNamespaceDumper() { $configuration = new ExampleConfiguration(); $dumper = new XmlReferenceDumper(); $this->assertEquals(str_replace('http://example.org/schema/dic/acme_root', 'http://symfony.com/schema/dic/symfony', $this->getConfigurationAsString()), $dumper->dump($configuration, 'http://symfony.com/schema/dic/symfony')); } private function getConfigurationAsString() { return str_replace("\n", PHP_EOL, <<<'EOL' scalar value EOL ); } }