function log($message, $level = LOG_INFO, $params = array(), lmbBacktrace $backtrace = null, $entry_title = null) { lmb_assert_type($level, 'integer'); if (!$backtrace) { lmb_assert_array_with_key($this->backtrace_depth, $level); $backtrace = new lmbBacktrace($this->backtrace_depth[$level]); } $this->_write($level, $message, $params, $backtrace, $entry_title); }
function testAssertArrayWithKey_CustomMessage() { $message = uniqid('lmb_assert_array_with_key'); try { lmb_assert_array_with_key(array(), 'some_key', $message); } catch (lmbInvalidArgumentException $e) { $this->assertPattern('/' . $message . '/', $e->getMessage()); } }