function testSingleton() { //nimm 2 ;-) $instance1 = OX_Admin_UI_Event_EventDispatcher::getInstance(); $instance2 = OX_Admin_UI_Event_EventDispatcher::getInstance(); $this->assertReference($instance1, $instance2); $this->assertIdentical($instance1, $instance2); }
/** * Retrieves an instance of event dispatcher * * @return OX_Admin_UI_Event_EventDispatcher */ private static function getDispatcher() { $oDispatcher = OX_Admin_UI_Event_EventDispatcher::getInstance(); return $oDispatcher; }