$this->
assertSame($message,
$container->
getAlias('alias_for_foo'
)->
getDeprecation('alias_for_foo'
)['message'
]);
$this->
assertTrue($container->
getAlias('alias_for_foobar'
)->
isDeprecated());
$message = 'The "alias_for_foobar" service alias is deprecated.';
$this->
assertSame($message,
$container->
getAlias('alias_for_foobar'
)->
getDeprecation('alias_for_foobar'
)['message'
]);
} public function testConvertDomElementToArray() { $doc =
new \
DOMDocument('1.0'
);
$doc->
loadXML('<foo>bar</foo>'
);
$this->
assertEquals('bar', XmlFileLoader::
convertDomElementToArray($doc->documentElement
), '::convertDomElementToArray() converts a \DomElement to an array'
);
$doc =
new \
DOMDocument('1.0'
);
$doc->
loadXML('<foo foo="bar" />'
);
$this->
assertEquals(['foo' => 'bar'
], XmlFileLoader::
convertDomElementToArray($doc->documentElement
), '::convertDomElementToArray() converts a \DomElement to an array'
);
$doc =
new \
DOMDocument('1.0'
);
$doc->
loadXML('<foo><foo>bar</foo></foo>'
);
$this->
assertEquals(['foo' => 'bar'
], XmlFileLoader::
convertDomElementToArray($doc->documentElement
), '::convertDomElementToArray() converts a \DomElement to an array'
);
$doc =
new \
DOMDocument('1.0'
);
$doc->
loadXML('<foo><foo>bar<foo>bar</foo></foo></foo>'
);