06.04 php saved
woodsman
Tags add more
 
Note
My test case that refuses to create a model
  1. /* /tests/fixtures/user_confirmation_test_fixture.php */
  2.  
  3. <?php
  4. class UserConfirmationTestFixture extends CakeTestFixture {
  5.     var $name = 'UserConfirmationTest';
  6.     var $import = 'User';
  7.    
  8.    
  9.     var $records = array(
  10.         array ('id' => 1, 'email' => 'elwood.casey@gmail.com', 'password' => 'dog')
  11.     );
  12.    
  13. }
  14. ?>
  15.  
  16. /* THE ACTUAL TEST CASE FILE (/tests/cases/models/user.test.php) */
  17. <?php
  18.  
  19. echo "DEF HERE";
  20. //exit;
  21.  
  22. App::import('Model', 'User');
  23.  
  24. /**
  25. * Subclass of my model.
  26. */
  27. class UserTest extends User
  28. {
  29.     var $useTable='users';
  30.     var $useDbConfig = 'test_suite';       
  31.     var $name = 'UserTest';
  32.     //tried a few variations here!
  33.     //var $useDbConfig = 'default';
  34.     //var $tablePrefix = '';
  35. }
  36. /**
  37. *
  38. */
  39. class UserTestCase extends CakeTestCase
  40. {
  41.  
  42.     var $fixtures = array( 'user_confirmation_test' );
  43.    
  44.  
  45.     function startCase()   
  46.     {
  47.         echo "start case got run";    //debugging, doesn't seem to print
  48.         $this->UserTest = & new UserTest();
  49.         //exit;
  50.     }
  51.    
  52.     /*
  53.     function startTest()
  54.     {
  55.         echo "start test got run";
  56.         exit;
  57.        
  58.     }
  59.     */
  60.    
  61.     /**
  62.      *
  63.      * @return
  64.      */
  65.     function testConfirmEmail()
  66.     {
  67.        // test stuff!!!
  68.     }
  69.    
  70. }
  71. ?>
Parsed in 0.062 seconds, using GeSHi 1.0.7.14

Modify this Paste