Skip to content

Commit

Permalink
Updating CakeSchema test so it runs in both solo and group contexts. …
Browse files Browse the repository at this point in the history
…Changing table used on TestPluginComment to match its name.
  • Loading branch information
markstory committed Feb 28, 2010
1 parent 27ffd43 commit 2a19a8d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions cake/tests/cases/libs/model/cake_schema.test.php
Expand Up @@ -463,7 +463,9 @@ class CakeSchemaTest extends CakeTestCase {
* @access public * @access public
*/ */
var $fixtures = array( 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'
); );


/** /**
Expand Down Expand Up @@ -559,6 +561,7 @@ function testSchemaReadWithPlugins() {
App::build(array( App::build(array(
'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
)); ));

$Schema =& new CakeSchema(); $Schema =& new CakeSchema();
$Schema->plugin = 'TestPlugin'; $Schema->plugin = 'TestPlugin';
$read = $Schema->read(array( $read = $Schema->read(array(
Expand All @@ -569,10 +572,10 @@ function testSchemaReadWithPlugins() {
unset($read['tables']['missing']); unset($read['tables']['missing']);
$this->assertTrue(isset($read['tables']['auth_users'])); $this->assertTrue(isset($read['tables']['auth_users']));
$this->assertTrue(isset($read['tables']['authors'])); $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->assertTrue(isset($read['tables']['posts']));
$this->assertEqual(count($read['tables']), 4); $this->assertEqual(count($read['tables']), 4);

App::build(); App::build();
} }


Expand Down
Expand Up @@ -24,7 +24,7 @@
* @license http://www.opensource.org/licenses/mit-license.php The MIT License * @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/ */
class TestPluginComment extends TestPluginAppModel { class TestPluginComment extends TestPluginAppModel {
var $useTable = 'comments'; var $useTable = 'test_plugin_comments';
var $name = 'TestPluginComment'; var $name = 'TestPluginComment';
} }
?> ?>

0 comments on commit 2a19a8d

Please sign in to comment.