public function testObserver() { Config::newInstance("JooS_Log", array("writers" => array("output", "null"))); $event = Log_Event::getInstance(); $event->message = "qwerty"; ob_start(); Log::observer($event); $text = ob_get_contents(); ob_clean(); $this->assertEquals("qwerty" . PHP_EOL, $text); }
/** * Save observers * * @return boolean */ public final function save() { $class = $this->name(); $name = self::_configName($class); $observers = $this->observers(); $config = Config::newInstance($name, $observers); return $config->save(); }