Changeset 326

Show
Ignore:
Timestamp:
08/27/07 10:11:52 (1 year ago)
Author:
bermiferrer
Message:

Adding simplified templates for model unit tests.

Please update your ./script/test manually to run your newly generated test cases.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/script/generators/model/templates/unit_test.tpl

    r319 r326  
    11<?php  echo '<?php'?> 
    22 
    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 
    55 
    6 class <?php  echo $class_name?>Test extends AkUnitTest 
     6class <?php  echo $class_name?>TestCase extends AkUnitTest 
    77{ 
    88    function test_setup() 
     
    1717} 
    1818 
    19  
    20 ak_test('<?php  echo $class_name?>Test',true); 
    21  
    2219?> 
  • trunk/script/generators/scaffold/templates/model_unit_test.tpl

    r318 r326  
    11<?php  echo '<?php'?> 
    22 
    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 
    55 
    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 
     6class <?php  echo $model_name?>TestCase extends AkUnitTest 
    107{ 
    118    function test_setup() 
     
    1310        $this->installAndIncludeModels('<?php  echo $model_name?>'); 
    1411    } 
    15  
     12     
    1613    function test_<?php  echo $model_name?>() 
    1714    { 
     
    2017} 
    2118 
    22 ak_test('<?php  echo $model_name?>Test',true); 
    23  
    2419?>