$this->fail('->load() throws an InvalidArgumentException if the loaded file does not exist');
}catch(\Exception$e){
$this->assertInstanceOf('\InvalidArgumentException',$e,'->load() throws an InvalidArgumentException if the loaded file does not exist');
$this->assertEquals('The service file "foo.yml" is not valid.',$e->getMessage(),'->load() throws an InvalidArgumentException if the loaded file does not exist');
}
try{
$m->invoke($loader,'parameters.ini');
$this->fail('->load() throws an InvalidArgumentException if the loaded file is not a valid YAML file');
}catch(\Exception$e){
$this->assertInstanceOf('\InvalidArgumentException',$e,'->load() throws an InvalidArgumentException if the loaded file is not a valid YAML file');
$this->assertEquals('The service file "parameters.ini" is not valid.',$e->getMessage(),'->load() throws an InvalidArgumentException if the loaded file is not a valid YAML file');
$this->fail('->load() throws an InvalidArgumentException if the loaded file does not validate');
}catch(\Exception$e){
$this->assertInstanceOf('\InvalidArgumentException',$e,'->load() throws an InvalidArgumentException if the loaded file does not validate');
$this->assertStringMatchesFormat('The service file "nonvalid%d.yml" is not valid.',$e->getMessage(),'->load() throws an InvalidArgumentException if the loaded file does not validate');
$this->assertTrue(isset($services['foo']),'->load() parses service elements');
$this->assertInstanceOf('Symfony\\Component\\DependencyInjection\\Definition',$services['foo'],'->load() converts service element to Definition instances');
$this->assertEquals('FooClass',$services['foo']->getClass(),'->load() parses the class attribute');
$this->assertEquals(array(array('setBar',array('foo',newReference('foo'),array(true,false)))),$services['method_call2']->getMethodCalls(),'->load() parses the method_call tag');
$this->assertEquals('factory',$services['new_factory1']->getFactory(),'->load() parses the factory tag');
$this->assertEquals(array(newReference('baz'),'getClass'),$services['new_factory2']->getFactory(),'->load() parses the factory tag');
$this->assertEquals(array('BazClass','getInstance'),$services['new_factory3']->getFactory(),'->load() parses the factory tag');
$this->assertEquals(array(newReference('baz'),'getClass'),$services['factory']->getFactory(),'->load() parses the factory tag with service:method');
$this->assertEquals(array('FooBacFactory','createFooBar'),$services['factory_with_static_call']->getFactory(),'->load() parses the factory tag with Class::method');
$this->fail('->load() throws an InvalidArgumentException if the tag is not valid');
}catch(\Exception$e){
$this->assertInstanceOf('\InvalidArgumentException',$e,'->load() throws an InvalidArgumentException if the tag is not valid');
$this->assertStringStartsWith('There is no extension able to load the configuration for "foobarfoobar" (in',$e->getMessage(),'->load() throws an InvalidArgumentException if the tag is not valid');
$this->fail('->load() should throw an exception when the tags key of a service is not an array');
}catch(\Exception$e){
$this->assertInstanceOf('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException',$e,'->load() throws an InvalidArgumentException if the tags key is not an array');
$this->assertStringStartsWith('Parameter "tags" must be an array for service',$e->getMessage(),'->load() throws an InvalidArgumentException if the tags key is not an array');
$this->fail('->load() should throw an exception when a tag is missing the name key');
}catch(\Exception$e){
$this->assertInstanceOf('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException',$e,'->load() throws an InvalidArgumentException if a tag is missing the name key');
$this->assertStringStartsWith('A "tags" entry is missing a "name" key for service ',$e->getMessage(),'->load() throws an InvalidArgumentException if a tag is missing the name key');
$this->fail('->load() should throw an exception when a tag-attribute is not a scalar');
}catch(\Exception$e){
$this->assertInstanceOf('Symfony\Component\DependencyInjection\Exception\InvalidArgumentException',$e,'->load() throws an InvalidArgumentException if a tag-attribute is not a scalar');
$this->assertStringStartsWith('A "tags" attribute must be of a scalar-type for service "foo_service", tag "foo", attribute "bar"',$e->getMessage(),'->load() throws an InvalidArgumentException if a tag-attribute is not a scalar');