source: trunk/tests/PageSequenceTest.php

Last change on this file was 468, checked in by anonymous, 10 years ago

Completed integrating /branches/eli_branch into /trunk. Changes include:

  • Removed closing ?> from end of files
  • Upgrade old-style contructor methods to use construct() instead.
  • Class properties and methods defined as public, private, static or protected
  • Ensure code runs under E_ALL with only mysql_* deprecated warnings
  • Search for the '@' symbol anywhere it might be used to supress runtime errors, then replace with proper error recovery.
  • Run the php cli -l option to check files for syntax errors.
  • Bring tests up-to-date with latest version and methods of PHPUnit
File size: 4.9 KB
Line 
1<?php
2/// FIXME: Tests not implemented.
3return;
4
5/**
6 * The Strangecode Codebase - a general application development framework for PHP
7 * For details visit the project site: <http://trac.strangecode.com/codebase/>
8 * Copyright 2001-2012 Strangecode, LLC
9 *
10 * This file is part of The Strangecode Codebase.
11 *
12 * The Strangecode Codebase is free software: you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License as published by the
14 * Free Software Foundation, either version 3 of the License, or (at your option)
15 * any later version.
16 *
17 * The Strangecode Codebase is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
19 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
20 * details.
21 *
22 * You should have received a copy of the GNU General Public License along with
23 * The Strangecode Codebase. If not, see <http://www.gnu.org/licenses/>.
24 */
25
26/**
27 * PHPUnit test case for codebase/lib/PageSequence.inc.php
28 *
29 * The method skeletons below need to be filled in with
30 * real data so that the tests will run correctly. Replace
31 * all EXPECTED_VAL and PARAM strings with real data.
32 *
33 * Created with PHPUnit_Skeleton on 2005-08-09
34 */
35
36class PageSequenceTest extends PHPUnit_Framework_TestCase {
37
38    var $PageSequence;
39
40    function PageSequenceTest($name)
41    {
42        $this->PHPUnit_Framework_TestCase($name);
43    }
44
45    function setUp()
46    {
47        require dirname(__FILE__) . '/_config.inc.php';
48        require_once '../lib/PageSequence.inc.php';
49        $this->PageSequence =& new PageSequence(PARAM);
50    }
51
52    function tearDown()
53    {
54        unset($this->PageSequence);
55    }
56
57    function test_addstep()
58    {
59        $result = $this->PageSequence->addstep(PARAM);
60        $expected = EXPECTED_VAL;
61        $this->assertEquals($expected, $result);
62    }
63
64    function test_setfeature()
65    {
66        $result = $this->PageSequence->setfeature(PARAM);
67        $expected = EXPECTED_VAL;
68        $this->assertEquals($expected, $result);
69    }
70
71    function test_getfeature()
72    {
73        $result = $this->PageSequence->getfeature(PARAM);
74        $expected = EXPECTED_VAL;
75        $this->assertEquals($expected, $result);
76    }
77
78    function test_setcurrent()
79    {
80        $result = $this->PageSequence->setcurrent(PARAM);
81        $expected = EXPECTED_VAL;
82        $this->assertEquals($expected, $result);
83    }
84
85    function test_getid()
86    {
87        $result = $this->PageSequence->getid(PARAM);
88        $expected = EXPECTED_VAL;
89        $this->assertEquals($expected, $result);
90    }
91
92    function test_getposition()
93    {
94        $result = $this->PageSequence->getposition(PARAM);
95        $expected = EXPECTED_VAL;
96        $this->assertEquals($expected, $result);
97    }
98
99    function test_getrequiredid()
100    {
101        $result = $this->PageSequence->getrequiredid(PARAM);
102        $expected = EXPECTED_VAL;
103        $this->assertEquals($expected, $result);
104    }
105
106    function test_getnextid()
107    {
108        $result = $this->PageSequence->getnextid(PARAM);
109        $expected = EXPECTED_VAL;
110        $this->assertEquals($expected, $result);
111    }
112
113    function test_complete()
114    {
115        $result = $this->PageSequence->complete(PARAM);
116        $expected = EXPECTED_VAL;
117        $this->assertEquals($expected, $result);
118    }
119
120    function test_printeditlink()
121    {
122        $result = $this->PageSequence->printeditlink(PARAM);
123        $expected = EXPECTED_VAL;
124        $this->assertEquals($expected, $result);
125    }
126
127    function test_setdatadefault()
128    {
129        $result = $this->PageSequence->setdatadefault(PARAM);
130        $expected = EXPECTED_VAL;
131        $this->assertEquals($expected, $result);
132    }
133
134    function test_getdata()
135    {
136        $result = $this->PageSequence->getdata(PARAM);
137        $expected = EXPECTED_VAL;
138        $this->assertEquals($expected, $result);
139    }
140
141    function test_cleardata()
142    {
143        $result = $this->PageSequence->cleardata(PARAM);
144        $expected = EXPECTED_VAL;
145        $this->assertEquals($expected, $result);
146    }
147
148    function test__auto_timeout()
149    {
150        $result = $this->PageSequence->_auto_timeout(PARAM);
151        $expected = EXPECTED_VAL;
152        $this->assertEquals($expected, $result);
153    }
154
155    function test_registerdata()
156    {
157        $result = $this->PageSequence->registerdata(PARAM);
158        $expected = EXPECTED_VAL;
159        $this->assertEquals($expected, $result);
160    }
161
162    function test_startover()
163    {
164        $result = $this->PageSequence->startover(PARAM);
165        $expected = EXPECTED_VAL;
166        $this->assertEquals($expected, $result);
167    }
168
169    function test_savedata()
170    {
171        $result = $this->PageSequence->savedata(PARAM);
172        $expected = EXPECTED_VAL;
173        $this->assertEquals($expected, $result);
174    }
175
176    function test_loaddata()
177    {
178        $result = $this->PageSequence->loaddata(PARAM);
179        $expected = EXPECTED_VAL;
180        $this->assertEquals($expected, $result);
181    }
182
183}
Note: See TracBrowser for help on using the repository browser.