$t->is(ProjectLoader::convertDomElementToArray($doc->documentElement), 'bar', '::convertDomElementToArray() converts a \\DomElement to an array');
$doc = new DOMDocument("1.0");
$doc->loadXML('<foo foo="bar" />');
$t->is(ProjectLoader::convertDomElementToArray($doc->documentElement), array('foo' => 'bar'), '::convertDomElementToArray() converts a \\DomElement to an array');
$doc = new DOMDocument("1.0");
$doc->loadXML('<foo><foo>bar</foo></foo>');
$t->is(ProjectLoader::convertDomElementToArray($doc->documentElement), array('foo' => 'bar'), '::convertDomElementToArray() converts a \\DomElement to an array');
$doc = new DOMDocument("1.0");
$doc->loadXML('<foo><foo>bar<foo>bar</foo></foo></foo>');
$t->is(ProjectLoader::convertDomElementToArray($doc->documentElement), array('foo' => array('value' => 'bar', 'foo' => 'bar')), '::convertDomElementToArray() converts a \\DomElement to an array');
$doc = new DOMDocument("1.0");
$doc->loadXML('<foo><foo></foo></foo>');
$t->is(ProjectLoader::convertDomElementToArray($doc->documentElement), array('foo' => null), '::convertDomElementToArray() converts a \\DomElement to an array');
$doc = new DOMDocument("1.0");
$doc->loadXML('<foo><foo><!-- foo --></foo></foo>');
$t->is(ProjectLoader::convertDomElementToArray($doc->documentElement), array('foo' => null), '::convertDomElementToArray() converts a \\DomElement to an array');
// extensions
$t->diag('extensions');
Loader::registerExtension(new ProjectExtension());
$loader = new ProjectLoader($fixturesPath . '/xml');
$config = $loader->load('services10.xml');
$services = $config->getDefinitions();
$parameters = $config->getParameters();
$t->ok(isset($services['project.service.bar']), '->load() parses extension elements');
$t->ok(isset($parameters['project.parameter.bar']), '->load() parses extension elements');
try {
    $config = $loader->load('services11.xml');
    $t->fail('->load() throws an InvalidArgumentException if the tag is not valid');
} catch (InvalidArgumentException $e) {
    $t->pass('->load() throws an InvalidArgumentException if the tag is not valid');
}