~tsep-dev/tsep/0.9-beta

« back to all changes in this revision

Viewing changes to branches/symfony/cake/tests/cases/libs/model/model.test.php

  • Committer: geoffreyfishing
  • Date: 2011-01-11 23:46:12 UTC
  • Revision ID: svn-v4:ae0de26e-ed09-4cbe-9a20-e40b4c60ac6c::125
Created a symfony branch for future migration to symfony

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
/**
 
3
 * ModelTest file
 
4
 *
 
5
 * PHP versions 4 and 5
 
6
 *
 
7
 * CakePHP(tm) Tests <http://book.cakephp.org/view/1196/Testing>
 
8
 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
 
9
 *
 
10
 *  Licensed under The Open Group Test Suite License
 
11
 *  Redistributions of files must retain the above copyright notice.
 
12
 *
 
13
 * @copyright     Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
 
14
 * @link          http://book.cakephp.org/view/1196/Testing CakePHP(tm) Tests
 
15
 * @package       cake
 
16
 * @subpackage    cake.tests.cases.libs.model
 
17
 * @since         CakePHP(tm) v 1.2.0.4206
 
18
 * @license       http://www.opensource.org/licenses/opengroup.php The Open Group Test Suite License
 
19
 */
 
20
App::import('Core', array('AppModel', 'Model'));
 
21
require_once dirname(__FILE__) . DS . 'models.php';
 
22
 
 
23
SimpleTest::ignore('BaseModelTest');
 
24
 
 
25
/**
 
26
 * ModelBaseTest
 
27
 *
 
28
 * @package       cake
 
29
 * @subpackage    cake.tests.cases.libs.model
 
30
 */
 
31
class BaseModelTest extends CakeTestCase {
 
32
 
 
33
/**
 
34
 * autoFixtures property
 
35
 *
 
36
 * @var bool false
 
37
 * @access public
 
38
 */
 
39
        var $autoFixtures = false;
 
40
 
 
41
/**
 
42
 * fixtures property
 
43
 *
 
44
 * @var array
 
45
 * @access public
 
46
 */
 
47
        var $fixtures = array(
 
48
                'core.category', 'core.category_thread', 'core.user', 'core.my_category', 'core.my_product',
 
49
                'core.my_user', 'core.my_categories_my_users', 'core.my_categories_my_products',
 
50
                'core.article', 'core.featured', 'core.article_featureds_tags', 'core.article_featured',
 
51
                'core.articles', 'core.numeric_article', 'core.tag', 'core.articles_tag', 'core.comment',
 
52
                'core.attachment', 'core.apple', 'core.sample', 'core.another_article', 'core.item',
 
53
                'core.advertisement', 'core.home', 'core.post', 'core.author', 'core.bid', 'core.portfolio',
 
54
                'core.product', 'core.project', 'core.thread', 'core.message', 'core.items_portfolio',
 
55
                'core.syfile', 'core.image', 'core.device_type', 'core.device_type_category',
 
56
                'core.feature_set', 'core.exterior_type_category', 'core.document', 'core.device',
 
57
                'core.document_directory', 'core.primary_model', 'core.secondary_model', 'core.something',
 
58
                'core.something_else', 'core.join_thing', 'core.join_a', 'core.join_b', 'core.join_c',
 
59
                'core.join_a_b', 'core.join_a_c', 'core.uuid', 'core.data_test', 'core.posts_tag',
 
60
                'core.the_paper_monkies', 'core.person', 'core.underscore_field', 'core.node',
 
61
                'core.dependency', 'core.story', 'core.stories_tag', 'core.cd', 'core.book', 'core.basket',
 
62
                'core.overall_favorite', 'core.account', 'core.content', 'core.content_account',
 
63
                'core.film_file', 'core.test_plugin_article', 'core.test_plugin_comment', 'core.uuiditem',
 
64
                'core.counter_cache_user', 'core.counter_cache_post',
 
65
                'core.counter_cache_user_nonstandard_primary_key',
 
66
                'core.counter_cache_post_nonstandard_primary_key', 'core.uuidportfolio',
 
67
                'core.uuiditems_uuidportfolio', 'core.uuiditems_uuidportfolio_numericid', 'core.fruit',
 
68
                'core.fruits_uuid_tag', 'core.uuid_tag', 'core.product_update_all', 'core.group_update_all'
 
69
        );
 
70
 
 
71
/**
 
72
 * start method
 
73
 *
 
74
 * @access public
 
75
 * @return void
 
76
 */
 
77
        function start() {
 
78
                parent::start();
 
79
                $this->debug = Configure::read('debug');
 
80
                Configure::write('debug', 2);
 
81
        }
 
82
 
 
83
/**
 
84
 * end method
 
85
 *
 
86
 * @access public
 
87
 * @return void
 
88
 */
 
89
        function end() {
 
90
                parent::end();
 
91
                Configure::write('debug', $this->debug);
 
92
        }
 
93
 
 
94
/**
 
95
 * endTest method
 
96
 *
 
97
 * @access public
 
98
 * @return void
 
99
 */
 
100
        function endTest() {
 
101
                ClassRegistry::flush();
 
102
        }
 
103
}