<?php
/**
* File for the ActiveRecordHelperTest class
*
* (PHP 5)
*
* @package PHPonTraxTest
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @copyright (c) Walter O. Haas 2006
* @version $Id$
* @author Walt Haas <hide@address.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.
@ini_set('include_path','./mockDB:'.ini_get('include_path'));
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",
"helpers" => "helpers",
"layouts" => "layouts",
"views" => "views");
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");
class DataType extends ActiveRecord {}
/**
* Test class for ActiveRecordHelper.
* Generated by PHPUnit2_Util_Skeleton on 2006-03-01 at 13:17:40.
*/
class ActiveRecordHelperTest extends PHPUnit2_Framework_TestCase {
/**
* Runs the test methods of this class.
*
* @access public
* @static
*/
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.
*
* @access protected
*/
protected function setUp() {
// Force constructor to get a connection
$GLOBALS['ACTIVE_RECORD_DB'] = null;
// Set up information that normally comes from database.ini
$GLOBALS['TRAX_DB_SETTINGS'][TRAX_MODE]
= array('phptype' => 'mysql',
'database' => 'database_development',
'hostspec' => 'localhost',
'username' => 'root',
'password' => '',
'persistent' => true);
}
/**
* Tears down the fixture, for example, close a network connection.
* This method is called after a test is executed.
*
* @access protected
*/
protected function tearDown() {
}
/**
* @todo Implement testInput_method().
*/
public function testInput_method() {
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
}
/**
* @todo Implement testInput_function().
*/
public function testInput_function() {
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
}
/**
* @todo Implement testInput_scaffolding_method().
*/
public function testInput_scaffolding_method() {
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
}
/**
* @todo Implement testInput_scaffolding_function().
*/
public function testInput_scaffolding_function() {
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
}
/**
* @todo Implement testForm_method().
*/
public function testForm_method() {
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
}
/**
* @todo Implement testForm_function().
*/
public function testForm_function() {
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
}
/**
* @todo Implement testError_message_on_method().
*/
public function testError_message_on_method() {
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
}
/**
* @todo Implement testError_message_on_function().
*/
public function testError_message_on_function() {
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
}
/**
* @todo Implement testError_messages_for_method().
*/
public function testError_messages_for_method() {
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
}
/**
* @todo Implement testError_messages_for_function().
*/
public function testError_messages_for_function() {
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
}
/**
* @todo Implement testAll_input_tags().
*/
public function testAll_input_tags() {
$ar = new ActionController;
$GLOBALS['current_controller_object'] = $ar;
$dt = new DataType;
$ar->DataType = $dt;
$arh = new ActiveRecordHelper();
$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().
*/
public function testDefault_input_block() {
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
}
/**
* @todo Implement testTo_tag().
*/
public function testTo_tag() {
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
}
/**
* @todo Implement testTo_scaffold_tag().
*/
public function testTo_scaffold_tag() {
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
}
/**
* @todo Implement testTag_without_error_wrapping().
*/
public function testTag_without_error_wrapping() {
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
}
/**
* @todo Implement testTag().
*/
public function testTag() {
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
}
/**
* @todo Implement testContent_tag_without_error_wrapping().
*/
public function testContent_tag_without_error_wrapping() {
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
}
/**
* @todo Implement testContent_tag().
*/
public function 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().
*/
public function 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().
*/
public function 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().
*/
public function 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().
*/
public function testTo_datetime_select_tag() {
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
}
/**
* @todo Implement testError_wrapping().
*/
public function testError_wrapping() {
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
}
/**
* @todo Implement testError_message().
*/
public function testError_message() {
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
}
/**
* @todo Implement testColumn_type().
*/
public function testColumn_type() {
// Remove the following line when you implement this test.
throw new PHPUnit2_Framework_IncompleteTestError;
}
/**
* @todo Implement testInput().
*/
public function 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.
if (PHPUnit2_MAIN_METHOD == "ActiveRecordHelperTest::main") {
ActiveRecordHelperTest::main();
}
// -- set Emacs parameters --
// Local variables:
// tab-width: 4
// c-basic-offset: 4
// c-hanging-comment-ender-p: nil
// indent-tabs-mode: nil
// End:
?>