/** * * Test -- Disallow all calls to methods besides factory() and the existing support methods. * */ public final function test__call() { // we use `new` instead of Solar::factory() so that we get back the // factory class itself, not an adapter generated by the factory $obj = new Solar_Log($this->_config); try { $obj->noSuchMethod(); $this->fail('__call() should not work'); } catch (Exception $e) { $this->assertTrue(true); } }
/** * * Saves a message to the log. * * @param string $class The class that the message refers to. * * @param string $message The event message. * * @return void * */ protected function _log($class, $message) { $message = "{$class}: {$message}"; $this->_log->save(get_class($this), 'docs', $message); }
/** * * Saves an event and message to the log. * * @param string $event The log event type. * * @param string $message The log message. * * @return boolean True if saved, false if not, null if logging * not enabled. * * @see Solar_Test_Suite::$_log * * @see Solar_Log::save() * */ protected function _log($message) { $this->_log->save(get_class($this), 'test', $message); }