Esempio n. 1
0
 function testRowNumberWithOffset()
 {
     $template = '<list:LIST id="test">' . '<list:ITEM>{$ListRowNumber}:{$First}</list:ITEM>' . '</list:LIST>';
     $this->registerTestingTemplate('/tags/list/list_row_number_with_offset.html', $template);
     $page = $this->initTemplate('/tags/list/list_row_number_with_offset.html');
     $list = $page->getChild('test');
     $dataset = new WactArrayIterator($this->founding_fathers);
     $dataset->paginate(1, 2);
     $list->registerDataSet($dataset);
     $this->assertEqual($page->capture(), '2:Alexander3:Benjamin');
 }
Esempio n. 2
0
 function current()
 {
     $current = parent::current();
     $current['sub'] = new WactArrayIterator(array(array('subvar1' => 'value1', 'subvar2' => 'value2'), array('subvar1' => 'value3', 'subvar2' => 'value4'), array('subvar1' => 'value5', 'subvar2' => 'value6')));
     return $current;
 }