* @license LGPL http://www.gnu.org/licenses/lgpl.html * @package wb * @subpackage Log */ /** * Log driver for Unit Testing * * @version 0.1.0 * @package wb * @subpackage Factory * @example test/example/wb.php * @test test/unit/log */ class WBLog_UnitTest extends WBLog { /** * log buffer * @var array */ protected $_buffer = array(); /** * Write log message * * @param int $level * @param mixed $msg * @return true on success */ protected function write( $level, $msg ) { $this->_buffer[] = array( $level, $msg ); return true; } /** * pop buffer * * @return array */ public function pop() { return array_pop( $this->_buffer ); } /** * shift buffer * * @return array */ public function shift() { return array_shift( $this->_buffer ); } } ?>