Пример #1
0
 public function testToJson()
 {
     $this->_paginator->setCurrentPageNumber(1);
     $json = $this->_paginator->toJson();
     $expected = '"0":1,"1":2,"2":3,"3":4,"4":5,"5":6,"6":7,"7":8,"8":9,"9":10';
     $this->assertContains($expected, $json);
 }
 public function testToJsonWithRowset()
 {
     $query = $this->_table->select();
     $paginator = new Zend_Paginator(new Zend_Paginator_Adapter_DbTableSelect($query));
     $this->assertGreaterThan(2, strlen($paginator->toJson()));
 }