public function testGetSet() { for ($i = 11; $i < 17; ++$i) { Diskerror\Utilities\Registry::set('_' . $i, $i * M_PI); } $this->assertEquals(Diskerror\Utilities\Registry::get('_13'), 13 * M_PI); $this->assertEquals(6, count(Diskerror\Utilities\Registry::getInstance())); $r = Diskerror\Utilities\Registry::getInstance(); $this->assertEquals(14 * M_PI, $r->_14); $this->assertEquals(6, count($r)); Diskerror\Utilities\Registry::unsetInstance(); $this->assertEquals(0, count(Diskerror\Utilities\Registry::getInstance())); }
public function testExistance() { $s = SingletonInstance::getInstance(); $this->assertEquals($s, Diskerror\Utilities\Registry::get('SingletonInstance')); }