/** * Test that the Stapler class can build a single instance of * ImagineInterface. * * @test */ public function it_should_be_able_to_create_a_singleton_imagine_interface_instance() { $imagine1 = Stapler::getImagineInstance('Imagine\\Gd\\Imagine'); $imagine2 = Stapler::getImagineInstance('Imagine\\Gd\\Imagine'); $this->assertInstanceOf('Imagine\\Image\\ImagineInterface', $imagine1); $this->assertSame($imagine1, $imagine2); }