Subversion Repositories Applications.papyrus

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
848 florian 1
<?php
2
// $Id$
3
 
4
require_once 'simple_include.php';
5
require_once 'pager_include.php';
6
 
7
class TestOfPagerSlidingNoData extends UnitTestCase {
8
    var $pager;
9
    function TestOfPagerSlidingNoData($name='Test of Pager_Sliding - no data') {
10
        $this->UnitTestCase($name);
11
    }
12
    function setUp() {
13
        $options = array(
14
            'totalItems' => 0,
15
            'perPage'  => 2,
16
            'mode'     => 'Sliding',
17
        );
18
        $this->pager = Pager::factory($options);
19
    }
20
    function tearDown() {
21
        unset($this->pager);
22
    }
23
    function testOffsetByPageId() {
24
        $this->assertEqual(array(1, 0), $this->pager->getOffsetByPageId());
25
    }
26
    function testPageIdByOffset() {
27
        $this->assertNull($this->pager->getPageIdByOffset());
28
    }
29
}
30
?>