From 2a19a8d5e4de5d448e8b79ab4893790c3b6dbf1c Mon Sep 17 00:00:00 2001 From: Mark Story Date: Sun, 28 Feb 2010 13:31:23 -0500 Subject: [PATCH] Updating CakeSchema test so it runs in both solo and group contexts. Changing table used on TestPluginComment to match its name. --- cake/tests/cases/libs/model/cake_schema.test.php | 9 ++++++--- .../plugins/test_plugin/models/test_plugin_comment.php | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/cake/tests/cases/libs/model/cake_schema.test.php b/cake/tests/cases/libs/model/cake_schema.test.php index ac1f42b6a..cb6e2cb1a 100644 --- a/cake/tests/cases/libs/model/cake_schema.test.php +++ b/cake/tests/cases/libs/model/cake_schema.test.php @@ -463,7 +463,9 @@ class CakeSchemaTest extends CakeTestCase { * @access public */ var $fixtures = array( - 'core.post', 'core.tag', 'core.posts_tag', 'core.comment', 'core.datatype', 'core.auth_user', 'core.author' + 'core.post', 'core.tag', 'core.posts_tag', 'core.test_plugin_comment', + 'core.datatype', 'core.auth_user', 'core.author', + 'core.test_plugin_article', 'core.user', 'core.comment' ); /** @@ -559,6 +561,7 @@ class CakeSchemaTest extends CakeTestCase { App::build(array( 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) )); + $Schema =& new CakeSchema(); $Schema->plugin = 'TestPlugin'; $read = $Schema->read(array( @@ -569,10 +572,10 @@ class CakeSchemaTest extends CakeTestCase { unset($read['tables']['missing']); $this->assertTrue(isset($read['tables']['auth_users'])); $this->assertTrue(isset($read['tables']['authors'])); - $this->assertTrue(isset($read['tables']['comments'])); + $this->assertTrue(isset($read['tables']['test_plugin_comments'])); $this->assertTrue(isset($read['tables']['posts'])); $this->assertEqual(count($read['tables']), 4); - + App::build(); } diff --git a/cake/tests/test_app/plugins/test_plugin/models/test_plugin_comment.php b/cake/tests/test_app/plugins/test_plugin/models/test_plugin_comment.php index 5330ba97c..84fbf0c98 100644 --- a/cake/tests/test_app/plugins/test_plugin/models/test_plugin_comment.php +++ b/cake/tests/test_app/plugins/test_plugin/models/test_plugin_comment.php @@ -24,7 +24,7 @@ * @license http://www.opensource.org/licenses/mit-license.php The MIT License */ class TestPluginComment extends TestPluginAppModel { - var $useTable = 'comments'; + var $useTable = 'test_plugin_comments'; var $name = 'TestPluginComment'; } ?> \ No newline at end of file