* Copyright 2001-2010 Strangecode, LLC * * This file is part of The Strangecode Codebase. * * The Strangecode Codebase is free software: you can redistribute it and/or * modify it under the terms of the GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your option) * any later version. * * The Strangecode Codebase is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * The Strangecode Codebase. If not, see . */ /** * PHPUnit test case for codebase/lib/PageSequence.inc.php * * The method skeletons below need to be filled in with * real data so that the tests will run correctly. Replace * all EXPECTED_VAL and PARAM strings with real data. * * Created with PHPUnit_Skeleton on 2005-08-09 */ require_once 'PHPUnit.php'; class PageSequenceTest extends PHPUnit_TestCase { var $PageSequence; function PageSequenceTest($name) { $this->PHPUnit_TestCase($name); } function setUp() { require dirname(__FILE__) . '/_config.inc.php'; require_once '../lib/PageSequence.inc.php'; $this->PageSequence =& new PageSequence(PARAM); } function tearDown() { unset($this->PageSequence); } function test_addstep() { $result = $this->PageSequence->addstep(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_setfeature() { $result = $this->PageSequence->setfeature(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_getfeature() { $result = $this->PageSequence->getfeature(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_setcurrent() { $result = $this->PageSequence->setcurrent(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_getid() { $result = $this->PageSequence->getid(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_getposition() { $result = $this->PageSequence->getposition(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_getrequiredid() { $result = $this->PageSequence->getrequiredid(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_getnextid() { $result = $this->PageSequence->getnextid(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_complete() { $result = $this->PageSequence->complete(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_printeditlink() { $result = $this->PageSequence->printeditlink(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_setdatadefault() { $result = $this->PageSequence->setdatadefault(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_getdata() { $result = $this->PageSequence->getdata(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_cleardata() { $result = $this->PageSequence->cleardata(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test__auto_timeout() { $result = $this->PageSequence->_auto_timeout(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_registerdata() { $result = $this->PageSequence->registerdata(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_startover() { $result = $this->PageSequence->startover(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_savedata() { $result = $this->PageSequence->savedata(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_loaddata() { $result = $this->PageSequence->loaddata(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } } // Running the test. $suite = new PHPUnit_TestSuite('PageSequenceTest'); $result = PHPUnit::run($suite); echo $result->toString(); ?>