01.11
php
saved
kabturek
Note
the Category model test case
fixtures are here :
http://bin.cakephp.org/view/988525363
the Category model test case
fixtures are here :
http://bin.cakephp.org/view/988525363
- <?php
- App::import('Model', 'Category');
- class CategoryTest extends Category{
- var $cacheSources = false;
- var $useDbConfig = 'test_suite';
- }
- class CategoryTestCase extends CakeTestCase
- {
- function start() {
- parent::start();
- $this->Category = new CategoryTest();
- }
- function testCount()
- {
- $result = $this->Category->findCount();
- $expected = 6;
- $this->assertEqual($result, $expected);
- }
- }
- ?>
Parsed in 0.022 seconds, using GeSHi 1.0.7.14