Changeset 326
- Timestamp:
- 08/27/07 10:11:52 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/script/generators/model/templates/unit_test.tpl
r319 r326 1 1 <?php echo '<?php'?> 2 2 3 defined('AK_TEST_DATABASE_ON') ? null : define('AK_TEST_DATABASE_ON', true); 4 require_once(dirname(__FILE__).'/../../../fixtures/config/config.php'); 3 // To run this test calling ./script/test unit/app/models/<?php echo $underscored_model_name; ?> 4 // More about testing at http://wiki.akelos.org/testing-guide 5 5 6 class <?php echo $class_name?>Test extends AkUnitTest6 class <?php echo $class_name?>TestCase extends AkUnitTest 7 7 { 8 8 function test_setup() … … 17 17 } 18 18 19 20 ak_test('<?php echo $class_name?>Test',true);21 22 19 ?> trunk/script/generators/scaffold/templates/model_unit_test.tpl
r318 r326 1 1 <?php echo '<?php'?> 2 2 3 defined('AK_TEST_DATABASE_ON') ? null : define('AK_TEST_DATABASE_ON', true); 4 require_once(dirname(__FILE__).'/../../../fixtures/config/config.php'); 3 // To run this test calling ./script/test unit/app/models/<?php echo AkInflector::underscore($class_name); ?> 4 // More about testing at http://wiki.akelos.org/testing-guide 5 5 6 // You can execute this test by running 7 // ./script/test app/models/<?php echo AkInflector::underscore($class_name)?>.php 8 9 class <?php echo $model_name?>Test extends AkUnitTest 6 class <?php echo $model_name?>TestCase extends AkUnitTest 10 7 { 11 8 function test_setup() … … 13 10 $this->installAndIncludeModels('<?php echo $model_name?>'); 14 11 } 15 12 16 13 function test_<?php echo $model_name?>() 17 14 { … … 20 17 } 21 18 22 ak_test('<?php echo $model_name?>Test',true);23 24 19 ?>
