mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Updating CakeSchema test so it runs in both solo and group contexts. Changing table used on TestPluginComment to match its name.
This commit is contained in:
parent
27ffd43214
commit
2a19a8d5e4
2 changed files with 7 additions and 4 deletions
|
@ -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'
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -559,6 +561,7 @@ class CakeSchemaTest extends CakeTestCase {
|
||||||
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(
|
||||||
|
@ -569,10 +572,10 @@ class CakeSchemaTest extends CakeTestCase {
|
||||||
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
Loading…
Add table
Reference in a new issue