Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
<?php
2
// $Id: pager_post_test_simple.php,v 1.1 2008/03/26 22:18:31 quipo Exp $
3
 
4
require_once 'simple_include.php';
5
require_once 'pager_include.php';
6
 
7
class TestOfPagerPOSTsimple extends UnitTestCase {
8
    var $pager;
9
    var $baseurl;
10
    var $options = array();
11
 
12
    function TestOfPagerPOSTsimple($name='Test of Pager with httpMethod="POST" - no web') {
13
        $this->UnitTestCase($name);
14
    }
15
    function setUp() {
16
        $this->options = array(
17
            'itemData' => array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10),
18
            'perPage'  => 1,
19
            'clearIfVoid' => false,
20
            'httpMethod' => 'POST',
21
        );
22
        //$this->pager = Pager::factory($this->options);
23
        $this->baseurl = 'http://'.$_SERVER['HTTP_HOST'].substr($_SERVER['PHP_SELF'], 0, strrpos($_SERVER['PHP_SELF'], '/'));
24
        //var_dump($this->baseurl.'/multibyte_post.php');
25
    }
26
    function tearDown() {
27
        unset($this->pager);
28
    }
29
 
30
    function testGetAndPost() {
31
        $this->pager =& Pager::factory($this->options);
32
        $this->assertNoPattern('/id=/', $this->pager->links);
33
 
34
        $_GET['id'] = 123;
35
        $this->pager =& Pager::factory($this->options);
36
        $this->assertPattern('/id=123/', $this->pager->links);
37
    }
38
}
39
?>