* Copyright 2001-2012 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/PEdit.inc.php * * T\he 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 */ class PEditTest extends PHPUnit_Framework_TestCase { var $PEdit; function PEditTest($name) { $this->PHPUnit_Framework_TestCase($name); } function setUp() { require dirname(__FILE__) . '/_config.inc.php'; require_once '../lib/PEdit.inc.php'; $this->PEdit =& new PEdit(PARAM); } function tearDown() { unset($this->PEdit); } function test_set() { $result = $this->PEdit->set(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_setcheckbox() { $result = $this->PEdit->setcheckbox(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_displaymode() { $result = $this->PEdit->displaymode(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_printversions() { $result = $this->PEdit->printversions(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_getcontent() { $result = $this->PEdit->getcontent(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_printcontent() { $result = $this->PEdit->printcontent(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_printform() { $result = $this->PEdit->printform(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_printallforms() { $result = $this->PEdit->printallforms(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_formbegin() { $result = $this->PEdit->formbegin(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test_formend() { $result = $this->PEdit->formend(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test__writedata() { $result = $this->PEdit->_writedata(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test__createversion() { $result = $this->PEdit->_createversion(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test__getversions() { $result = $this->PEdit->_getversions(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } function test__restoreversion() { $result = $this->PEdit->_restoreversion(PARAM); $expected = EXPECTED_VAL; $this->assertEquals($expected, $result); } }