public function assign($name, $value = '') { if (is_array($name)) { $this->data = array_merge($this->data, $name); } else { $this->data[$name] = $value; } }
public function testVarGet() { $template = new Template(); $data = ['a' => 'a', 'b' => 'b']; $template->assign($data); $this->assertEquals($data, $template->get()); }