function testPaginate() { $output1 = '<a href="#1">1</a> <a href="#2">2</a> '; $output2 = '<span>1 </span><a href="#2">2</a> '; $output3 = '<span>1 </span> <a href="#2">2</a> ... <a href="#4">4</a> '; $output4 = '<span>1 </span> ... <a href="#3">3</a> <a href="#4">4</a> '; $pg = Raxan::paginate(2, 3); $this->compare($output1, $pg, 'Simple paginator'); $pg = Raxan::paginate(2, 1); $this->compare($output2, $pg, 'Page 1 selected'); // paginator with truncate options $pg = Raxan::paginate(4, 1, array('truncate' => -1.2, 'delimiter' => ' ')); $this->compare($output3, $pg, 'Paginator with truncate (-1.2) and delimiter options'); // paginator with truncate options $pg = Raxan::paginate(4, 1, array('truncate' => 1.1, 'delimiter' => ' ')); $this->compare($output4, $pg, 'Paginator with truncate (1.1) and delimiter options'); }