Skip to content
Permalink
Browse files

Updating CakeSchema test so it runs in both solo and group contexts. …

…Changing table used on TestPluginComment to match its name.
  • Loading branch information...
markstory committed Feb 28, 2010
1 parent 27ffd43 commit 2a19a8d5e4de5d448e8b79ab4893790c3b6dbf1c
@@ -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 @@ function testSchemaReadWithPlugins() {
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 @@ function testSchemaReadWithPlugins() {
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();
}
@@ -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';
}
?>

0 comments on commit 2a19a8d

Please sign in to comment.
You can’t perform that action at this time.