/** * @test * @expectedException Exception * @expectedExceptionMessage registry is already initialized */ public function testSetInstanceHasInstance() { Registry::unsetInstance(); Registry::set('bar', 'barvalue'); $foo = new Registry(['bar' => 'barvalue']); Registry::setInstance($foo); }