// +---------------------------------------------------------------------- namespace tests\thinkphp\library\think; use think\paginator\driver\Bootstrap; class paginateTest extends \PHPUnit_Framework_TestCase { public function testPaginatorInfo() { $p = Bootstrap::make($array = ['item3', 'item4'], 2, 2, 4); $this->assertEquals(4, $p->total()); $this->assertEquals(2, $p->listRows()); $this->assertEquals(2, $p->currentPage()); $p2 = Bootstrap::make($array2 = ['item3', 'item4'], 2, 2, 2); $this->assertEquals(1, $p2->currentPage()); } public function testPaginatorRender() { $p = Bootstrap::make($array = ['item3', 'item4'], 2, 2, 100); $render = '
'; $this->assertEquals($render, $p->render()); } }