/** * @test * it should allow setting a singleton using set instances */ public function it_should_allow_setting_a_singleton_using_set_instances() { $class = 'ObjectFour'; $this->sut->setCtor('myObject', 'ObjectOne::create'); $this->sut->setShared('singleton', $class . '::create', '@myObject', 'foo'); $i1 = $this->sut->make('singleton'); $i2 = $this->sut->make('singleton'); $this->assertSame($i1, $i2); }