Example #1
0
 /**
  * Render a template through a basic php include
  *
  * ex. view('home/index.php', array('title'=>'Title'));
  *
  * @access protected
  * @param string $view the view to be rendered.
  * @param array $values the values to be shown on the view
  * @return void
  */
 protected function view($view, $values = array())
 {
     if (!Walleye::isProduction()) {
         $values['logs'] = Console::getLogs();
     } else {
         $values['logs'] = Console::getAlerts();
     }
     include Walleye::getServerBaseDir() . 'includes/app/views/' . $view;
 }
Example #2
0
 /**
  *
  */
 public function testGetAlerts()
 {
     Console::alert('hello');
     $logs = Console::getAlerts();
     $this->assertEquals('hello', $logs[0]['message']);
 }