private function render($data, $users) { View::renderTemplate("header", $data, 'MetroTemplate'); echo "<h1>"; echo "Hello " . $users->fname; echo "</h1>"; Session::set('user_name', $users->user_name); $o = ""; $o .= Form::open(array('action' => 'logout', 'method' => 'post')); $o .= Form::hidden(array('id' => 'username', 'name' => 'username', 'value' => Session::get('user_name'))); $o .= Form::submit(array()); $o .= Form::close(); echo $o; View::renderTemplate("footer", $data, 'MetroTemplate'); }
/** * @dataProvider hiddenProvider */ public function testHidden($expected, $name, $value = '') { $this->assertEquals($expected, \Helpers\Form::hidden($name, $value)); }