public function testAppContext() { $config = new Zend_Config_Ini(SGL2_PATH . '/tests/config.ini', 'staging'); $registry = SGL2_Registry::createInstance($config); $registry2 = SGL2_Registry::getInstance(); $this->assertThat($registry, $this->identicalTo($registry2)); $this->assertTrue(SGL2_Registry::hasInstance()); $registry->set('foo', new Foo()); $this->assertSame($registry->get('foo'), $registry2->get('foo')); $this->assertTrue(is_a($registry->get('foo'), 'Foo')); }
public function __construct() { $config = new Zend_Config_Ini(PROJECT_PATH . '/var/config.ini', 'staging'); $registry = SGL2_Registry::createInstance($config); $this->registry = $registry; }