mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 11:06:15 +00:00
Fix failing tests caused by previous commit.
This commit is contained in:
parent
58a2ee064c
commit
6d6ac10834
4 changed files with 9 additions and 8 deletions
|
@ -279,7 +279,7 @@ class FixtureTask extends BakeTask {
|
||||||
*/
|
*/
|
||||||
protected function _generateSchema($tableInfo) {
|
protected function _generateSchema($tableInfo) {
|
||||||
$schema = $this->_Schema->generateTable('f', $tableInfo);
|
$schema = $this->_Schema->generateTable('f', $tableInfo);
|
||||||
return substr($schema, 10, -2);
|
return substr($schema, 13, -2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -353,12 +353,12 @@ class SchemaShellTest extends CakeTestCase {
|
||||||
$contents = $this->file->read();
|
$contents = $this->file->read();
|
||||||
|
|
||||||
$this->assertRegExp('/class TestPluginSchema/', $contents);
|
$this->assertRegExp('/class TestPluginSchema/', $contents);
|
||||||
$this->assertRegExp('/var \$posts/', $contents);
|
$this->assertRegExp('/public \$posts/', $contents);
|
||||||
$this->assertRegExp('/var \$auth_users/', $contents);
|
$this->assertRegExp('/public \$auth_users/', $contents);
|
||||||
$this->assertRegExp('/var \$authors/', $contents);
|
$this->assertRegExp('/public \$authors/', $contents);
|
||||||
$this->assertRegExp('/var \$test_plugin_comments/', $contents);
|
$this->assertRegExp('/public \$test_plugin_comments/', $contents);
|
||||||
$this->assertNotRegExp('/var \$users/', $contents);
|
$this->assertNotRegExp('/public \$users/', $contents);
|
||||||
$this->assertNotRegExp('/var \$articles/', $contents);
|
$this->assertNotRegExp('/public \$articles/', $contents);
|
||||||
CakePlugin::unload();
|
CakePlugin::unload();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ App::uses('ShellDispatcher', 'Console');
|
||||||
App::uses('Shell', 'Console');
|
App::uses('Shell', 'Console');
|
||||||
App::uses('ConsoleOutput', 'Console');
|
App::uses('ConsoleOutput', 'Console');
|
||||||
App::uses('ConsoleInput', 'Console');
|
App::uses('ConsoleInput', 'Console');
|
||||||
|
App::uses('ModelTask', 'Console/Command/Task');
|
||||||
App::uses('FixtureTask', 'Console/Command/Task');
|
App::uses('FixtureTask', 'Console/Command/Task');
|
||||||
App::uses('TemplateTask', 'Console/Command/Task');
|
App::uses('TemplateTask', 'Console/Command/Task');
|
||||||
App::uses('DbConfigTask', 'Console/Command/Task');
|
App::uses('DbConfigTask', 'Console/Command/Task');
|
||||||
|
|
|
@ -741,7 +741,7 @@ class CakeSchemaTest extends CakeTestCase {
|
||||||
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => true)),
|
'indexes' => array('PRIMARY' => array('column' => 'id', 'unique' => true)),
|
||||||
);
|
);
|
||||||
$result = $this->Schema->generateTable('posts', $posts);
|
$result = $this->Schema->generateTable('posts', $posts);
|
||||||
$this->assertRegExp('/var \$posts/', $result);
|
$this->assertRegExp('/public \$posts/', $result);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* testSchemaWrite method
|
* testSchemaWrite method
|
||||||
|
|
Loading…
Add table
Reference in a new issue