ModelTestBase.php 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. <?php
  2. /**
  3. * ModelTest file
  4. *
  5. * PHP 5
  6. *
  7. * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html>
  8. * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  9. *
  10. * Licensed under The MIT License
  11. * For full copyright and license information, please see the LICENSE.txt
  12. * Redistributions of files must retain the above copyright notice
  13. *
  14. * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
  15. * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests
  16. * @since CakePHP(tm) v 1.2.0.4206
  17. * @license http://www.opensource.org/licenses/mit-license.php MIT License
  18. */
  19. namespace Cake\Test\TestCase\Model;
  20. use Cake\Core\App;
  21. use Cake\Model\Model;
  22. use Cake\Model\ModelBehavior;
  23. use Cake\TestSuite\TestCase;
  24. require_once __DIR__ . DS . 'models.php';
  25. /**
  26. * ModelBaseTest
  27. *
  28. */
  29. abstract class ModelTestBase extends TestCase {
  30. /**
  31. * autoFixtures property
  32. *
  33. * @var boolean
  34. */
  35. public $autoFixtures = false;
  36. /**
  37. * Whether backup global state for each test method or not
  38. *
  39. * @var boolean
  40. */
  41. public $backupGlobals = false;
  42. /**
  43. * fixtures property
  44. *
  45. * @var array
  46. */
  47. public $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.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. 'core.player', 'core.guild', 'core.guilds_player', 'core.armor', 'core.armors_player',
  70. 'core.bidding', 'core.bidding_message', 'core.site', 'core.domain', 'core.domains_site',
  71. );
  72. /**
  73. * setUp method
  74. *
  75. * @return void
  76. */
  77. public function setUp() {
  78. $this->markTestIncomplete('Model layer is not working at this time.');
  79. parent::setUp();
  80. $this->debug = Configure::read('debug');
  81. }
  82. /**
  83. * tearDown method
  84. *
  85. * @return void
  86. */
  87. public function tearDown() {
  88. parent::tearDown();
  89. Configure::write('debug', $this->debug);
  90. ClassRegistry::flush();
  91. }
  92. }