Look at example:
1) App::import instead of loadModel
2) in model declaration add useTable and clean unnecessery
associations.
  If you need some association from real model you should redeclare
all models in this test case.
3) If test case declaration - need to declare fixture.
4) Fixture possible to create based on "cake scema generate" script
result.


App::import("Model", 'Flag');
class FlagTest extends Flag {
    var $name = 'Flag';
    var $useTable = 'flag_tests';
        var $useDbConfig = 'test_suite';
        var $cacheSources = false;
        var $belongsTo = array();
        var $hasOne = array();
        var $hasMany = array();
        var $hasAndBelongsToMany = array();
}



class FlagTestCase extends CakeTestCase {
        var $TestObject = null;
        var $fixtures = array('flag_test',      );

        function testItShouldGroupFlags() {
                $this->Flag = new FlagTest();
        }
}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to