2008-05-30 11:40:08 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2009-03-18 17:55:58 +00:00
|
|
|
* ModelTest file
|
2008-05-30 11:40:08 +00:00
|
|
|
*
|
|
|
|
* PHP versions 4 and 5
|
|
|
|
*
|
|
|
|
* CakePHP(tm) Tests <https://trac.cakephp.org/wiki/Developement/TestSuite>
|
2010-01-26 19:18:20 +00:00
|
|
|
* Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
2008-05-30 11:40:08 +00:00
|
|
|
*
|
|
|
|
* Licensed under The Open Group Test Suite License
|
|
|
|
* Redistributions of files must retain the above copyright notice.
|
|
|
|
*
|
2010-01-26 19:18:20 +00:00
|
|
|
* @copyright Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
|
2008-10-30 17:30:26 +00:00
|
|
|
* @link https://trac.cakephp.org/wiki/Developement/TestSuite CakePHP(tm) Tests
|
2009-03-18 17:55:58 +00:00
|
|
|
* @package cake
|
2008-10-30 17:30:26 +00:00
|
|
|
* @subpackage cake.tests.cases.libs.model
|
|
|
|
* @since CakePHP(tm) v 1.2.0.4206
|
|
|
|
* @license http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
|
2008-05-30 11:40:08 +00:00
|
|
|
*/
|
|
|
|
App::import('Core', array('AppModel', 'Model'));
|
|
|
|
require_once dirname(__FILE__) . DS . 'models.php';
|
2009-07-08 03:25:30 +00:00
|
|
|
|
|
|
|
SimpleTest::ignore('BaseModelTest');
|
|
|
|
|
2008-05-30 11:40:08 +00:00
|
|
|
/**
|
2009-07-04 19:23:22 +00:00
|
|
|
* ModelBaseTest
|
2008-05-30 11:40:08 +00:00
|
|
|
*
|
2009-03-18 17:55:58 +00:00
|
|
|
* @package cake
|
2008-10-30 17:30:26 +00:00
|
|
|
* @subpackage cake.tests.cases.libs.model
|
2008-05-30 11:40:08 +00:00
|
|
|
*/
|
2009-07-04 19:23:22 +00:00
|
|
|
class BaseModelTest extends CakeTestCase {
|
2009-07-24 19:18:37 +00:00
|
|
|
|
2008-06-02 19:22:55 +00:00
|
|
|
/**
|
|
|
|
* autoFixtures property
|
2008-06-14 20:39:27 +00:00
|
|
|
*
|
2008-06-02 19:22:55 +00:00
|
|
|
* @var bool false
|
|
|
|
* @access public
|
|
|
|
*/
|
2008-05-30 11:40:08 +00:00
|
|
|
var $autoFixtures = false;
|
2009-07-24 19:18:37 +00:00
|
|
|
|
2008-06-02 19:22:55 +00:00
|
|
|
/**
|
|
|
|
* fixtures property
|
2008-06-14 20:39:27 +00:00
|
|
|
*
|
2008-06-02 19:22:55 +00:00
|
|
|
* @var array
|
|
|
|
* @access public
|
|
|
|
*/
|
2008-05-30 11:40:08 +00:00
|
|
|
var $fixtures = array(
|
2008-11-09 03:20:14 +00:00
|
|
|
'core.category', 'core.category_thread', 'core.user', 'core.my_category', 'core.my_product',
|
|
|
|
'core.my_user', 'core.my_categories_my_users', 'core.my_categories_my_products',
|
|
|
|
'core.article', 'core.featured', 'core.article_featureds_tags', 'core.article_featured',
|
|
|
|
'core.articles', 'core.numeric_article', 'core.tag', 'core.articles_tag', 'core.comment',
|
|
|
|
'core.attachment', 'core.apple', 'core.sample', 'core.another_article', 'core.item',
|
|
|
|
'core.advertisement', 'core.home', 'core.post', 'core.author', 'core.bid', 'core.portfolio',
|
|
|
|
'core.product', 'core.project', 'core.thread', 'core.message', 'core.items_portfolio',
|
|
|
|
'core.syfile', 'core.image', 'core.device_type', 'core.device_type_category',
|
|
|
|
'core.feature_set', 'core.exterior_type_category', 'core.document', 'core.device',
|
|
|
|
'core.document_directory', 'core.primary_model', 'core.secondary_model', 'core.something',
|
|
|
|
'core.something_else', 'core.join_thing', 'core.join_a', 'core.join_b', 'core.join_c',
|
|
|
|
'core.join_a_b', 'core.join_a_c', 'core.uuid', 'core.data_test', 'core.posts_tag',
|
|
|
|
'core.the_paper_monkies', 'core.person', 'core.underscore_field', 'core.node',
|
|
|
|
'core.dependency', 'core.story', 'core.stories_tag', 'core.cd', 'core.book', 'core.basket',
|
|
|
|
'core.overall_favorite', 'core.account', 'core.content', 'core.content_account',
|
|
|
|
'core.film_file', 'core.test_plugin_article', 'core.test_plugin_comment', 'core.uuiditem',
|
2009-04-22 16:47:34 +00:00
|
|
|
'core.counter_cache_user', 'core.counter_cache_post',
|
|
|
|
'core.counter_cache_user_nonstandard_primary_key',
|
|
|
|
'core.counter_cache_post_nonstandard_primary_key', 'core.uuidportfolio',
|
|
|
|
'core.uuiditems_uuidportfolio', 'core.uuiditems_uuidportfolio_numericid', 'core.fruit',
|
2009-09-09 03:48:32 +00:00
|
|
|
'core.fruits_uuid_tag', 'core.uuid_tag', 'core.product_update_all', 'core.group_update_all'
|
2008-05-30 11:40:08 +00:00
|
|
|
);
|
2009-07-24 19:18:37 +00:00
|
|
|
|
2008-06-02 19:22:55 +00:00
|
|
|
/**
|
|
|
|
* start method
|
2008-06-14 20:39:27 +00:00
|
|
|
*
|
2008-06-02 19:22:55 +00:00
|
|
|
* @access public
|
|
|
|
* @return void
|
|
|
|
*/
|
2008-05-30 11:40:08 +00:00
|
|
|
function start() {
|
|
|
|
parent::start();
|
|
|
|
$this->debug = Configure::read('debug');
|
|
|
|
Configure::write('debug', 2);
|
|
|
|
}
|
2009-07-24 19:18:37 +00:00
|
|
|
|
2008-06-02 19:22:55 +00:00
|
|
|
/**
|
|
|
|
* end method
|
2008-06-14 20:39:27 +00:00
|
|
|
*
|
2008-06-02 19:22:55 +00:00
|
|
|
* @access public
|
|
|
|
* @return void
|
|
|
|
*/
|
2008-05-30 11:40:08 +00:00
|
|
|
function end() {
|
|
|
|
parent::end();
|
|
|
|
Configure::write('debug', $this->debug);
|
|
|
|
}
|
2009-07-24 19:18:37 +00:00
|
|
|
|
2009-03-18 17:55:58 +00:00
|
|
|
/**
|
|
|
|
* endTest method
|
|
|
|
*
|
|
|
|
* @access public
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
function endTest() {
|
|
|
|
ClassRegistry::flush();
|
|
|
|
}
|
2008-05-30 11:40:08 +00:00
|
|
|
}
|
2009-03-18 17:55:58 +00:00
|
|
|
?>
|