예제 #1
0
 function testIt()
 {
     $arr = new MyArray();
     for ($i = 0; $i < 20; $i++) {
         $val = new stdClass();
         $val->foo = "foo value {$i}";
         $arr->push($val);
     }
     $tpl = $this->newPHPTAL('input/array-overload.01.html');
     $tpl->myobject = $arr;
     $res = $tpl->execute();
     $exp = normalize_html_file('output/array-overload.01.html');
     $res = normalize_html($res);
     $this->assertEquals($exp, $res);
 }