Source for file ActiveRecordHelperTest.php
Documentation is available at ActiveRecordHelperTest.php
* File for the ActiveRecordHelperTest class
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @copyright (c) Walter O. Haas 2006
* @version $Id: ActiveRecordHelperTest.php 198 2006-04-20 16:20:30Z haas $
* @author Walt Haas <haas@xmission.com>
echo "testing ActiveRecordHelper\n";
require_once 'testenv.php';
// We need to load a mock DB class to test ActiveRecordHelper
// Change the include path to put the mockDB/ directory first, so
// that when ActiveRecord loads it will pick up the mock class.
require_once "active_record.php";
// Call ActiveRecordErrorTest::main() if this source file is executed directly.
if (!defined("PHPUnit2_MAIN_METHOD")) {
define("PHPUnit2_MAIN_METHOD", "ActiveRecordHelperTest::main");
require_once "PHPUnit2/Framework/TestCase.php";
require_once "PHPUnit2/Framework/TestSuite.php";
// You may remove the following line when all tests have been implemented.
require_once "PHPUnit2/Framework/IncompleteTestError.php";
// root Trax files in the test directory
define("TRAX_ROOT", dirname(__FILE__ ) . "/");
define("TRAX_VIEWS_EXTENTION", "phtml");
$GLOBALS['TRAX_INCLUDES'] =
array( "config" => "config",
"controllers" => "controllers",
require_once "action_view/helpers.php";
require_once "action_view/helpers/active_record_helper.php";
require_once "router.php";
require_once 'trax_exceptions.php';
require_once 'inflector.php';
require_once 'action_controller.php';
// Set Trax operating mode
define("TRAX_MODE", "development");
* Test class for ActiveRecordHelper.
* Generated by PHPUnit2_Util_Skeleton on 2006-03-01 at 13:17:40.
* Runs the test methods of this class.
public static function main() {
require_once "PHPUnit2/TextUI/TestRunner.php";
$suite = new PHPUnit2_Framework_TestSuite("ActiveRecordHelperTest");
$result = PHPUnit2_TextUI_TestRunner::run($suite);
* Sets up the fixture, for example, open a network connection.
* This method is called before a test is executed.
protected function setUp() {
// Force constructor to get a connection
$GLOBALS['ACTIVE_RECORD_DB'] = null;
// Set up information that normally comes from database.ini
= array('phptype' => 'mysql',
'database' => 'database_development',
'hostspec' => 'localhost',
* Tears down the fixture, for example, close a network connection.
* This method is called after a test is executed.
* @todo Implement testInput_method().
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
* @todo Implement testInput_function().
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
* @todo Implement testInput_scaffolding_method().
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
* @todo Implement testInput_scaffolding_function().
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
* @todo Implement testForm_method().
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
* @todo Implement testForm_function().
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
* @todo Implement testError_message_on_method().
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
* @todo Implement testError_message_on_function().
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
* @todo Implement testError_messages_for_method().
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
* @todo Implement testError_messages_for_function().
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
* @todo Implement testAll_input_tags().
$GLOBALS['current_controller_object'] = $ar;
$arh->scaffolding = true;
echo "calling all_input_tags()\n";
echo $arh->all_input_tags($dt, 'DataType', array());
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
* @todo Implement testDefault_input_block().
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
* @todo Implement testTo_tag().
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
* @todo Implement testTo_scaffold_tag().
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
* @todo Implement testTag_without_error_wrapping().
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
* @todo Implement testTag().
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
* @todo Implement testContent_tag_without_error_wrapping().
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
* @todo Implement testContent_tag().
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
* @todo Implement testTo_date_select_tag_without_error_wrapping().
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
* @todo Implement testTo_date_select_tag().
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
* @todo Implement testTo_datetime_select_tag_without_error_wrapping().
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
* @todo Implement testTo_datetime_select_tag().
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
* @todo Implement testError_wrapping().
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
* @todo Implement testError_message().
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
* @todo Implement testColumn_type().
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
* @todo Implement testInput().
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
// Call ActiveRecordHelperTest::main() if this source file is executed directly.
// -- set Emacs parameters --
// c-hanging-comment-ender-p: nil
|