/** * @covers Apricot\Component\DependencyInjection::provide * @covers Apricot\Component\DependencyInjection::get */ public function testObjectIsCreatedWithArguments() { require 'Fixtures/DependencyInjectionFixture.php'; Apricot::reset(); Apricot::set('foo', 'Foo'); Apricot::provide('bar', '\\stdClass'); Apricot::provide('baz', '\\DependencyInjectionFixture', array('%foo%', '@bar')); $instance = Apricot::get('baz'); $this->assertTrue('Foo' === $instance->a); $this->assertTrue($instance->b instanceof \stdClass); }