06.03 php saved
killerboy
Tags add more
Testing  
Note
killerboy did not leave a note
  1. <?php
  2. App::import('Model', 'User');
  3.  
  4. class UserTest extends User {
  5.     var $name = 'UserTest';
  6.     var $useDbConfig = 'test_suite';
  7. }
  8.  
  9. class UserTestCase extends CakeTestCase {
  10.     var $fixtures = array('app.user_test');
  11.    
  12.    
  13.     function startCase()
  14.     {
  15.         $this->UserTest =& new UserTest();
  16.     }
  17.    
  18.    
  19.     function testCount()
  20.     {
  21.         $result = $this->UserTest->findCount();
  22.         $expected = 3;
  23.         $this->assertEqual($result, $expected);
  24.     }
  25.    
  26.    
  27. }
  28.  
  29. ?>
Parsed in 0.024 seconds, using GeSHi 1.0.7.14

Modify this Paste