統計
| ブランチ: | リビジョン:

pictcode / lib / Cake / Test / Case / Model / ModelTestBase.php @ 635eef61

履歴 | 表示 | アノテート | ダウンロード (3.401 KB)

1
<?php
2
/**
3
 * ModelTest file
4
 *
5
 * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
6
 * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
7
 *
8
 * Licensed under The MIT License
9
 * For full copyright and license information, please see the LICENSE.txt
10
 * Redistributions of files must retain the above copyright notice
11
 *
12
 * @copyright     Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
13
 * @link          http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
14
 * @package       Cake.Test.Case.Model
15
 * @since         CakePHP(tm) v 1.2.0.4206
16
 * @license       http://www.opensource.org/licenses/mit-license.php MIT License
17
 */
18

    
19
App::uses('Model', 'Model');
20
App::uses('AppModel', 'Model');
21

    
22
require_once dirname(__FILE__) . DS . 'models.php';
23

    
24
/**
25
 * ModelBaseTest
26
 *
27
 * @package       Cake.Test.Case.Model
28
 */
29
abstract class BaseModelTest extends CakeTestCase {
30

    
31
/**
32
 * autoFixtures property
33
 *
34
 * @var bool
35
 */
36
        public $autoFixtures = false;
37

    
38
/**
39
 * Whether backup global state for each test method or not
40
 *
41
 * @var bool
42
 */
43
        public $backupGlobals = false;
44

    
45
/**
46
 * fixtures property
47
 *
48
 * @var array
49
 */
50
        public $fixtures = array(
51
                'core.category', 'core.category_thread', 'core.user', 'core.my_category', 'core.my_product',
52
                'core.my_user', 'core.my_categories_my_users', 'core.my_categories_my_products',
53
                'core.article', 'core.featured', 'core.article_featureds_tags', 'core.article_featured',
54
                'core.numeric_article', 'core.tag', 'core.articles_tag', 'core.comment',
55
                'core.attachment', 'core.apple', 'core.sample', 'core.another_article', 'core.item',
56
                'core.advertisement', 'core.home', 'core.post', 'core.author', 'core.bid', 'core.portfolio',
57
                'core.product', 'core.project', 'core.thread', 'core.message', 'core.items_portfolio',
58
                'core.syfile', 'core.image', 'core.device_type', 'core.device_type_category',
59
                'core.feature_set', 'core.exterior_type_category', 'core.document', 'core.device',
60
                'core.document_directory', 'core.primary_model', 'core.secondary_model', 'core.something',
61
                'core.something_else', 'core.join_thing', 'core.join_a', 'core.join_b', 'core.join_c',
62
                'core.join_a_b', 'core.join_a_c', 'core.uuid', 'core.data_test', 'core.posts_tag',
63
                'core.the_paper_monkies', 'core.person', 'core.underscore_field', 'core.node',
64
                'core.dependency', 'core.story', 'core.stories_tag', 'core.cd', 'core.book', 'core.basket',
65
                'core.overall_favorite', 'core.account', 'core.content', 'core.content_account',
66
                'core.film_file', 'core.test_plugin_article', 'core.test_plugin_comment', 'core.uuiditem',
67
                'core.counter_cache_user', 'core.counter_cache_post',
68
                'core.counter_cache_user_nonstandard_primary_key',
69
                'core.counter_cache_post_nonstandard_primary_key', 'core.uuidportfolio',
70
                'core.uuiditems_uuidportfolio', 'core.uuiditems_uuidportfolio_numericid', 'core.fruit',
71
                'core.fruits_uuid_tag', 'core.uuid_tag', 'core.product_update_all', 'core.group_update_all',
72
                'core.player', 'core.guild', 'core.guilds_player', 'core.armor', 'core.armors_player',
73
                'core.bidding', 'core.bidding_message', 'core.site', 'core.domain', 'core.domains_site',
74
        );
75

    
76
/**
77
 * setUp method
78
 *
79
 * @return void
80
 */
81
        public function setUp() {
82
                parent::setUp();
83
                $this->debug = Configure::read('debug');
84
        }
85

    
86
/**
87
 * tearDown method
88
 *
89
 * @return void
90
 */
91
        public function tearDown() {
92
                parent::tearDown();
93
                Configure::write('debug', $this->debug);
94
                ClassRegistry::flush();
95
        }
96
}