From 5c3b4cfcc4d35fd41cc2957e25ad9d48b35210d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Lorenzo=20Rodr=C3=ADguez?= Date: Sun, 19 Sep 2010 22:28:30 -0430 Subject: [PATCH] Removing all uses of the test_suite connection in the test cases --- cake/tests/cases/console/libs/acl.test.php | 4 +- cake/tests/cases/console/libs/bake.test.php | 2 +- cake/tests/cases/console/libs/schema.test.php | 28 ++++----- .../console/libs/tasks/controller.test.php | 36 +++++------ .../cases/console/libs/tasks/fixture.test.php | 20 +++--- .../cases/console/libs/tasks/model.test.php | 62 +++++++++---------- .../cases/console/libs/tasks/view.test.php | 6 +- cake/tests/cases/libs/all_tests.test.php | 2 +- cake/tests/cases/libs/cake_session.test.php | 6 +- .../cases/libs/cake_test_fixture.test.php | 44 ++++++------- .../libs/controller/components/acl.test.php | 6 +- .../libs/controller/components/auth.test.php | 10 +-- .../controller/components/session.test.php | 2 +- .../cases/libs/model/behaviors/acl.test.php | 2 +- .../cases/libs/model/cake_schema.test.php | 22 +++---- .../libs/model/connection_manager.test.php | 4 +- .../model/datasources/dbo/dbo_mssql.test.php | 2 +- .../model/datasources/dbo/dbo_mysql.test.php | 24 +++---- .../model/datasources/dbo/dbo_mysqli.test.php | 4 +- .../datasources/dbo/dbo_postgres.test.php | 38 ++++++------ .../model/datasources/dbo/dbo_sqlite.test.php | 6 +- .../model/datasources/dbo_source.test.php | 2 +- cake/tests/cases/libs/model/db_acl.test.php | 8 +-- .../libs/model/model_integration.test.php | 8 +-- .../cases/libs/model/model_read.test.php | 6 +- cake/tests/cases/libs/model/models.php | 2 +- cake/tests/cases/libs/sanitize.test.php | 34 +++++----- .../libs/session/database_session.test.php | 4 +- cake/tests/lib/cake_test_fixture.php | 4 +- .../models/test_plugin_auth_user.php | 4 +- 30 files changed, 201 insertions(+), 201 deletions(-) diff --git a/cake/tests/cases/console/libs/acl.test.php b/cake/tests/cases/console/libs/acl.test.php index 559e5eb3a..e32182652 100644 --- a/cake/tests/cases/console/libs/acl.test.php +++ b/cake/tests/cases/console/libs/acl.test.php @@ -59,7 +59,7 @@ class AclShellTest extends CakeTestCase { $this->_aclDb = Configure::read('Acl.database'); $this->_aclClass = Configure::read('Acl.classname'); - Configure::write('Acl.database', 'test_suite'); + Configure::write('Acl.database', 'test'); Configure::write('Acl.classname', 'DbAcl'); $this->Dispatcher = $this->getMock( @@ -74,7 +74,7 @@ class AclShellTest extends CakeTestCase { $collection = new ComponentCollection(); $this->Task->Acl = new AclComponent($collection); - $this->Task->params['datasource'] = 'test_suite'; + $this->Task->params['datasource'] = 'test'; } /** diff --git a/cake/tests/cases/console/libs/bake.test.php b/cake/tests/cases/console/libs/bake.test.php index 370cabc90..e0c3f8fbb 100644 --- a/cake/tests/cases/console/libs/bake.test.php +++ b/cake/tests/cases/console/libs/bake.test.php @@ -96,7 +96,7 @@ class BakeShellTest extends CakeTestCase { $this->Shell->View = $this->getMock('ModelTask', array(), array(&$this->Dispatcher)); $this->Shell->DbConfig = $this->getMock('DbConfigTask', array(), array(&$this->Dispatcher)); - $this->Shell->DbConfig->expects($this->once())->method('getConfig')->will($this->returnValue('test_suite')); + $this->Shell->DbConfig->expects($this->once())->method('getConfig')->will($this->returnValue('test')); $this->Shell->Model->expects($this->never())->method('getName'); $this->Shell->Model->expects($this->once())->method('bake')->will($this->returnValue(true)); diff --git a/cake/tests/cases/console/libs/schema.test.php b/cake/tests/cases/console/libs/schema.test.php index bfcfb31bd..e1c0ddfd3 100644 --- a/cake/tests/cases/console/libs/schema.test.php +++ b/cake/tests/cases/console/libs/schema.test.php @@ -54,10 +54,10 @@ class SchemaShellTestSchema extends CakeSchema { /** * connection property * - * @var string 'test_suite' + * @var string 'test' * @access public */ - public $connection = 'test_suite'; + public $connection = 'test'; /** * comments property @@ -165,13 +165,13 @@ class SchemaShellTest extends CakeTestCase { unset($this->Shell->Schema); $this->Shell->params = array( 'file' => 'other_file.php', - 'connection' => 'test_suite', + 'connection' => 'test', 'path' => '/test/path' ); $this->Shell->startup(); $this->assertEqual(strtolower($this->Shell->Schema->name), strtolower(APP_DIR)); $this->assertEqual($this->Shell->Schema->file, 'other_file.php'); - $this->assertEqual($this->Shell->Schema->connection, 'test_suite'); + $this->assertEqual($this->Shell->Schema->connection, 'test'); $this->assertEqual($this->Shell->Schema->path, '/test/path'); } @@ -251,7 +251,7 @@ class SchemaShellTest extends CakeTestCase { )); $this->Shell->args = array('TestPlugin.TestPluginApp'); $this->Shell->params = array( - 'connection' => 'test_suite', + 'connection' => 'test', 'write' => TMP . 'tests' . DS . 'dump_test.sql' ); $this->Shell->startup(); @@ -347,7 +347,7 @@ class SchemaShellTest extends CakeTestCase { )); $this->Shell->params = array( 'plugin' => 'TestPlugin', - 'connection' => 'test_suite' + 'connection' => 'test' ); $this->Shell->startup(); $this->Shell->Schema->path = TMP . 'tests' . DS; @@ -375,7 +375,7 @@ class SchemaShellTest extends CakeTestCase { */ public function testCreateNoArgs() { $this->Shell->params = array( - 'connection' => 'test_suite', + 'connection' => 'test', 'path' => APP . 'config' . DS . 'sql' ); $this->Shell->args = array('i18n'); @@ -383,7 +383,7 @@ class SchemaShellTest extends CakeTestCase { $this->Shell->expects($this->any())->method('in')->will($this->returnValue('y')); $this->Shell->create(); - $db = ConnectionManager::getDataSource('test_suite'); + $db = ConnectionManager::getDataSource('test'); $sources = $db->listSources(); $this->assertTrue(in_array($db->config['prefix'] . 'i18n', $sources)); @@ -398,7 +398,7 @@ class SchemaShellTest extends CakeTestCase { */ public function testCreateWithTableArgs() { $this->Shell->params = array( - 'connection' => 'test_suite', + 'connection' => 'test', 'name' => 'DbAcl', 'path' => APP . 'config' . DS . 'schema' ); @@ -423,7 +423,7 @@ class SchemaShellTest extends CakeTestCase { */ public function testUpdateWithTable() { $this->Shell->params = array( - 'connection' => 'test_suite', + 'connection' => 'test', 'f' => true ); $this->Shell->args = array('SchemaShellTest', 'articles'); @@ -431,7 +431,7 @@ class SchemaShellTest extends CakeTestCase { $this->Shell->expects($this->any())->method('in')->will($this->returnValue('y')); $this->Shell->update(); - $article =& new Model(array('name' => 'Article', 'ds' => 'test_suite')); + $article =& new Model(array('name' => 'Article', 'ds' => 'test')); $fields = $article->schema(); $this->assertTrue(isset($fields['summary'])); @@ -448,7 +448,7 @@ class SchemaShellTest extends CakeTestCase { )); $this->Shell->params = array( 'plugin' => 'TestPlugin', - 'connection' => 'test_suite' + 'connection' => 'test' ); $this->Shell->startup(); $expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS . 'config' . DS . 'schema'; @@ -467,14 +467,14 @@ class SchemaShellTest extends CakeTestCase { 'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS) )); $this->Shell->params = array( - 'connection' => 'test_suite' + 'connection' => 'test' ); $this->Shell->args = array('TestPlugin.TestPluginApp'); $this->Shell->startup(); $this->Shell->expects($this->any())->method('in')->will($this->returnValue('y')); $this->Shell->create(); - $db =& ConnectionManager::getDataSource('test_suite'); + $db =& ConnectionManager::getDataSource('test'); $sources = $db->listSources(); $this->assertTrue(in_array($db->config['prefix'] . 'acos', $sources)); diff --git a/cake/tests/cases/console/libs/tasks/controller.test.php b/cake/tests/cases/console/libs/tasks/controller.test.php index 9e325af43..c720c092a 100644 --- a/cake/tests/cases/console/libs/tasks/controller.test.php +++ b/cake/tests/cases/console/libs/tasks/controller.test.php @@ -116,12 +116,12 @@ class ControllerTaskTest extends CakeTestCase { * @return void */ public function testListAll() { - $count = count($this->Task->listAll('test_suite')); + $count = count($this->Task->listAll('test')); if ($count != count($this->fixtures)) { $this->markTestSkipped('Additional tables detected.'); } - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->interactive = true; $this->Task->expects($this->at(1))->method('out')->with('1. BakeArticles'); $this->Task->expects($this->at(2))->method('out')->with('2. BakeArticlesBakeTags'); @@ -129,7 +129,7 @@ class ControllerTaskTest extends CakeTestCase { $this->Task->expects($this->at(4))->method('out')->with('4. BakeTags'); $expected = array('BakeArticles', 'BakeArticlesBakeTags', 'BakeComments', 'BakeTags'); - $result = $this->Task->listAll('test_suite'); + $result = $this->Task->listAll('test'); $this->assertEqual($result, $expected); $this->Task->interactive = false; @@ -145,7 +145,7 @@ class ControllerTaskTest extends CakeTestCase { * @return void */ public function testGetNameValidIndex() { - $count = count($this->Task->listAll('test_suite')); + $count = count($this->Task->listAll('test')); if ($count != count($this->fixtures)) { $this->markTestSkipped('Additional tables detected.'); } @@ -153,11 +153,11 @@ class ControllerTaskTest extends CakeTestCase { $this->Task->expects($this->at(5))->method('in')->will($this->returnValue(3)); $this->Task->expects($this->at(7))->method('in')->will($this->returnValue(1)); - $result = $this->Task->getName('test_suite'); + $result = $this->Task->getName('test'); $expected = 'BakeComments'; $this->assertEqual($result, $expected); - $result = $this->Task->getName('test_suite'); + $result = $this->Task->getName('test'); $expected = 'BakeArticles'; $this->assertEqual($result, $expected); } @@ -175,7 +175,7 @@ class ControllerTaskTest extends CakeTestCase { $this->Task->expects($this->once())->method('err'); $this->Task->expects($this->once())->method('_stop'); - $this->Task->getName('test_suite'); + $this->Task->getName('test'); } /** @@ -417,7 +417,7 @@ class ControllerTaskTest extends CakeTestCase { */ public function testBakeTest() { $this->Task->plugin = 'ControllerTest'; - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->interactive = false; $this->Task->Test->expects($this->once())->method('bake')->with('Controller', 'BakeArticles'); @@ -434,12 +434,12 @@ class ControllerTaskTest extends CakeTestCase { * @return void */ public function testInteractive() { - $count = count($this->Task->listAll('test_suite')); + $count = count($this->Task->listAll('test')); if ($count != count($this->fixtures)) { $this->markTestSkipped('Additional tables detected.'); } - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->path = '/my/path/'; $this->Task->expects($this->any())->method('in') @@ -469,12 +469,12 @@ class ControllerTaskTest extends CakeTestCase { * @return void */ function testInteractiveAdminMethodsNotInteractive() { - $count = count($this->Task->listAll('test_suite')); + $count = count($this->Task->listAll('test')); if ($count != count($this->fixtures)) { $this->markTestSkipped('Additional tables detected.'); } - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->interactive = true; $this->Task->path = '/my/path/'; @@ -516,7 +516,7 @@ class ControllerTaskTest extends CakeTestCase { if ($skip) { return; } - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->path = '/my/path/'; $this->Task->args = array('all'); @@ -543,7 +543,7 @@ class ControllerTaskTest extends CakeTestCase { if ($skip) { return; } - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->path = '/my/path/'; $this->Task->args = array('BakeArticles'); @@ -579,7 +579,7 @@ class ControllerTaskTest extends CakeTestCase { if ($skip) { return; } - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->path = '/my/path/'; $this->Task->args = array($name); @@ -601,7 +601,7 @@ class ControllerTaskTest extends CakeTestCase { if ($skip) { return; } - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->path = '/my/path/'; $this->Task->args = array('BakeArticles', 'public'); @@ -625,7 +625,7 @@ class ControllerTaskTest extends CakeTestCase { return; } $this->Task->Project->expects($this->any())->method('getPrefix')->will($this->returnValue('admin_')); - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->path = '/my/path/'; $this->Task->args = array('BakeArticles', 'public', 'admin'); @@ -648,7 +648,7 @@ class ControllerTaskTest extends CakeTestCase { return; } $this->Task->Project->expects($this->any())->method('getPrefix')->will($this->returnValue('admin_')); - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->path = '/my/path/'; $this->Task->args = array('BakeArticles', 'admin'); diff --git a/cake/tests/cases/console/libs/tasks/fixture.test.php b/cake/tests/cases/console/libs/tasks/fixture.test.php index f9485a789..8d5af9595 100644 --- a/cake/tests/cases/console/libs/tasks/fixture.test.php +++ b/cake/tests/cases/console/libs/tasks/fixture.test.php @@ -147,7 +147,7 @@ class FixtureTaskTest extends CakeTestCase { $this->Task->expects($this->at(0))->method('in') ->will($this->returnValue('WHERE 1=1 LIMIT 10')); - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->path = '/my/path/'; $result = $this->Task->bake('Article', false, array( @@ -168,7 +168,7 @@ class FixtureTaskTest extends CakeTestCase { * @return void */ public function testExecuteWithNamedModel() { - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->path = '/my/path/'; $this->Task->args = array('article'); $filename = '/my/path/article_fixture.php'; @@ -197,7 +197,7 @@ class FixtureTaskTest extends CakeTestCase { * @return void */ public function testExecuteWithNamedModelVariations($modelName) { - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->path = '/my/path/'; $this->Task->args = array($modelName); @@ -214,7 +214,7 @@ class FixtureTaskTest extends CakeTestCase { * @return void */ public function testExecuteIntoAll() { - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->path = '/my/path/'; $this->Task->args = array('all'); $this->Task->Model->expects($this->any())->method('listAll') @@ -237,7 +237,7 @@ class FixtureTaskTest extends CakeTestCase { * @return void */ public function testAllWithCountAndRecordsFlags() { - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->path = '/my/path/'; $this->Task->args = array('all'); $this->Task->params = array('count' => 10, 'records' => true); @@ -263,7 +263,7 @@ class FixtureTaskTest extends CakeTestCase { * @return void */ public function testExecuteInteractive() { - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->path = '/my/path/'; $this->Task->expects($this->any())->method('in')->will($this->returnValue('y')); @@ -285,7 +285,7 @@ class FixtureTaskTest extends CakeTestCase { * @return void */ public function testBake() { - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->path = '/my/path/'; $result = $this->Task->bake('Article'); @@ -320,7 +320,7 @@ class FixtureTaskTest extends CakeTestCase { * @return void */ public function testRecordGenerationForBinaryAndFloat() { - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->path = '/my/path/'; $result = $this->Task->bake('Article', 'datatypes'); @@ -336,7 +336,7 @@ class FixtureTaskTest extends CakeTestCase { * @return void */ public function testGenerateFixtureFile() { - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->path = '/my/path/'; $filename = '/my/path/article_fixture.php'; @@ -357,7 +357,7 @@ class FixtureTaskTest extends CakeTestCase { * @return void */ public function testGeneratePluginFixtureFile() { - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->path = '/my/path/'; $this->Task->plugin = 'TestFixture'; $filename = APP . 'plugins' . DS . 'test_fixture' . DS . 'tests' . DS . 'fixtures' . DS . 'article_fixture.php'; diff --git a/cake/tests/cases/console/libs/tasks/model.test.php b/cake/tests/cases/console/libs/tasks/model.test.php index b81e3f3d8..a693e5e48 100644 --- a/cake/tests/cases/console/libs/tasks/model.test.php +++ b/cake/tests/cases/console/libs/tasks/model.test.php @@ -112,7 +112,7 @@ class ModelTaskTest extends CakeTestCase { * @return void */ public function testListAll() { - $count = count($this->Task->listAll('test_suite')); + $count = count($this->Task->listAll('test')); if ($count != count($this->fixtures)) { $this->markTestSkipped('Additional tables detected.'); } @@ -130,11 +130,11 @@ class ModelTaskTest extends CakeTestCase { $this->Task->expects($this->at(10))->method('out')->with('4. Comment'); $this->Task->expects($this->at(11))->method('out')->with('5. Tag'); - $result = $this->Task->listAll('test_suite'); + $result = $this->Task->listAll('test'); $expected = array('articles', 'articles_tags', 'category_threads', 'comments', 'tags'); $this->assertEqual($result, $expected); - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $result = $this->Task->listAll(); $expected = array('articles', 'articles_tags', 'category_threads', 'comments', 'tags'); $this->assertEqual($result, $expected); @@ -148,7 +148,7 @@ class ModelTaskTest extends CakeTestCase { public function testGetNameQuit() { $this->Task->expects($this->once())->method('in')->will($this->returnValue('q')); $this->Task->expects($this->once())->method('_stop'); - $this->Task->getName('test_suite'); + $this->Task->getName('test'); } /** @@ -157,18 +157,18 @@ class ModelTaskTest extends CakeTestCase { * @return void */ function testGetNameValidOption() { - $count = count($this->Task->listAll('test_suite')); + $count = count($this->Task->listAll('test')); if ($count != count($this->fixtures)) { $this->markTestSkipped('Additional tables detected.'); } $this->Task->expects($this->any())->method('in')->will($this->onConsecutiveCalls(1, 4)); - $result = $this->Task->getName('test_suite'); + $result = $this->Task->getName('test'); $expected = 'Article'; $this->assertEqual($result, $expected); - $result = $this->Task->getName('test_suite'); + $result = $this->Task->getName('test'); $expected = 'Comment'; $this->assertEqual($result, $expected); } @@ -182,7 +182,7 @@ class ModelTaskTest extends CakeTestCase { $this->Task->expects($this->any())->method('in')->will($this->onConsecutiveCalls(99, 1)); $this->Task->expects($this->once())->method('err'); - $result = $this->Task->getName('test_suite'); + $result = $this->Task->getName('test'); } /** @@ -192,7 +192,7 @@ class ModelTaskTest extends CakeTestCase { */ public function testGetTableName() { $this->Task->expects($this->at(0))->method('in')->will($this->returnValue('y')); - $result = $this->Task->getTable('Article', 'test_suite'); + $result = $this->Task->getTable('Article', 'test'); $expected = 'articles'; $this->assertEqual($result, $expected); } @@ -204,7 +204,7 @@ class ModelTaskTest extends CakeTestCase { */ function testGetTableNameCustom() { $this->Task->expects($this->any())->method('in')->will($this->onConsecutiveCalls('n', 'my_table')); - $result = $this->Task->getTable('Article', 'test_suite'); + $result = $this->Task->getTable('Article', 'test'); $expected = 'my_table'; $this->assertEqual($result, $expected); } @@ -421,7 +421,7 @@ class ModelTaskTest extends CakeTestCase { * @return void */ public function testBelongsToGeneration() { - $model = new Model(array('ds' => 'test_suite', 'name' => 'Comment')); + $model = new Model(array('ds' => 'test', 'name' => 'Comment')); $result = $this->Task->findBelongsTo($model, array()); $expected = array( 'belongsTo' => array( @@ -439,7 +439,7 @@ class ModelTaskTest extends CakeTestCase { ); $this->assertEqual($result, $expected); - $model = new Model(array('ds' => 'test_suite', 'name' => 'CategoryThread')); + $model = new Model(array('ds' => 'test', 'name' => 'CategoryThread')); $result = $this->Task->findBelongsTo($model, array()); $expected = array( 'belongsTo' => array( @@ -459,8 +459,8 @@ class ModelTaskTest extends CakeTestCase { * @return void */ public function testHasManyHasOneGeneration() { - $model = new Model(array('ds' => 'test_suite', 'name' => 'Article')); - $this->Task->connection = 'test_suite'; + $model = new Model(array('ds' => 'test', 'name' => 'Article')); + $this->Task->connection = 'test'; $this->Task->listAll(); $result = $this->Task->findHasOneAndMany($model, array()); $expected = array( @@ -481,7 +481,7 @@ class ModelTaskTest extends CakeTestCase { ); $this->assertEqual($result, $expected); - $model = new Model(array('ds' => 'test_suite', 'name' => 'CategoryThread')); + $model = new Model(array('ds' => 'test', 'name' => 'CategoryThread')); $result = $this->Task->findHasOneAndMany($model, array()); $expected = array( 'hasOne' => array( @@ -508,13 +508,13 @@ class ModelTaskTest extends CakeTestCase { * @return void */ public function testHasAndBelongsToManyGeneration() { - $count = count($this->Task->listAll('test_suite')); + $count = count($this->Task->listAll('test')); if ($count != count($this->fixtures)) { $this->markTestSkipped('Additional tables detected.'); } - $model = new Model(array('ds' => 'test_suite', 'name' => 'Article')); - $this->Task->connection = 'test_suite'; + $model = new Model(array('ds' => 'test', 'name' => 'Article')); + $this->Task->connection = 'test'; $this->Task->listAll(); $result = $this->Task->findHasAndBelongsToMany($model, array()); $expected = array( @@ -537,9 +537,9 @@ class ModelTaskTest extends CakeTestCase { * @return void */ public function testDoAssociationsNonInteractive() { - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->interactive = false; - $model = new Model(array('ds' => 'test_suite', 'name' => 'Article')); + $model = new Model(array('ds' => 'test', 'name' => 'Article')); $result = $this->Task->doAssociations($model); $expected = array( 'hasMany' => array( @@ -623,7 +623,7 @@ class ModelTaskTest extends CakeTestCase { ), ) ); - $model = new Model(array('ds' => 'test_suite', 'name' => 'CategoryThread')); + $model = new Model(array('ds' => 'test', 'name' => 'CategoryThread')); $this->Task->expects($this->any())->method('in') ->will($this->onConsecutiveCalls('n', 'y', 'n', 'n', 'n')); @@ -774,7 +774,7 @@ STRINGEND; * @return void */ public function testExecuteWithNamedModel() { - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->path = '/my/path/'; $this->Task->args = array('article'); $filename = '/my/path/article.php'; @@ -807,7 +807,7 @@ STRINGEND; * @return void */ public function testExecuteWithNamedModelVariations($name) { - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->path = '/my/path/'; $this->Task->expects($this->once())->method('_checkUnitTest')->will($this->returnValue(1)); @@ -825,7 +825,7 @@ STRINGEND; * @return void */ public function testExecuteWithNamedModelHasManyCreated() { - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->path = '/my/path/'; $this->Task->args = array('article'); $filename = '/my/path/article.php'; @@ -843,12 +843,12 @@ STRINGEND; * @return void */ public function testExecuteIntoAll() { - $count = count($this->Task->listAll('test_suite')); + $count = count($this->Task->listAll('test')); if ($count != count($this->fixtures)) { $this->markTestSkipped('Additional tables detected.'); } - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->path = '/my/path/'; $this->Task->args = array('all'); $this->Task->expects($this->once())->method('_checkUnitTest')->will($this->returnValue(true)); @@ -888,12 +888,12 @@ STRINGEND; * @return void */ function testSkipTablesAndAll() { - $count = count($this->Task->listAll('test_suite')); + $count = count($this->Task->listAll('test')); if ($count != count($this->fixtures)) { $this->markTestSkipped('Additional tables detected.'); } - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->path = '/my/path/'; $this->Task->args = array('all'); $this->Task->expects($this->once())->method('_checkUnitTest')->will($this->returnValue(true)); @@ -927,12 +927,12 @@ STRINGEND; * @return void */ public function testExecuteIntoInteractive() { - $count = count($this->Task->listAll('test_suite')); + $count = count($this->Task->listAll('test')); if ($count != count($this->fixtures)) { $this->markTestSkipped('Additional tables detected.'); } - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->path = '/my/path/'; $this->Task->interactive = true; @@ -969,7 +969,7 @@ STRINGEND; * @return void */ public function testExecuteWithNonExistantTableName() { - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->path = '/my/path/'; $this->Task->expects($this->once())->method('_stop'); diff --git a/cake/tests/cases/console/libs/tasks/view.test.php b/cake/tests/cases/console/libs/tasks/view.test.php index dcce78240..4a56b0d9a 100644 --- a/cake/tests/cases/console/libs/tasks/view.test.php +++ b/cake/tests/cases/console/libs/tasks/view.test.php @@ -613,7 +613,7 @@ class ViewTaskTest extends CakeTestCase { * @return void */ public function testExecuteInteractive() { - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->args = array(); $this->Task->params = array(); @@ -658,7 +658,7 @@ class ViewTaskTest extends CakeTestCase { * @return void */ public function testExecuteWithAlternateTemplates() { - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->args = array('ViewTaskComments', 'index', 'list'); $this->Task->params = array(); @@ -677,7 +677,7 @@ class ViewTaskTest extends CakeTestCase { */ public function testExecuteInteractiveWithAdmin() { Configure::write('Routing.prefixes', array('admin')); - $this->Task->connection = 'test_suite'; + $this->Task->connection = 'test'; $this->Task->args = array(); $this->Task->Controller->expects($this->once())->method('getName') diff --git a/cake/tests/cases/libs/all_tests.test.php b/cake/tests/cases/libs/all_tests.test.php index df8556f93..1597d1fba 100644 --- a/cake/tests/cases/libs/all_tests.test.php +++ b/cake/tests/cases/libs/all_tests.test.php @@ -49,7 +49,7 @@ class AllTests extends PHPUnit_Framework_TestSuite { //$suite->addTestFile($path . 'all_model.test.php'); $suite->addTestFile($path . 'all_routing.test.php'); $suite->addTestFile($path . 'all_socket.test.php'); - //$suite->addTestFile($path . 'all_test_suite.test.php');; + //$suite->addTestFile($path . 'all_test.test.php');; $suite->addTestFile($path . 'all_views.test.php'); $suite->addTestFile($path . 'all_xml.test.php'); return $suite; diff --git a/cake/tests/cases/libs/cake_session.test.php b/cake/tests/cases/libs/cake_session.test.php index 02086b01f..f24fff1ec 100644 --- a/cake/tests/cases/libs/cake_session.test.php +++ b/cake/tests/cases/libs/cake_session.test.php @@ -116,7 +116,7 @@ class CakeSessionTest extends CakeTestCase { $_SESSION = null; Configure::write('Session', array( - 'cookie' => 'test_suite', + 'cookie' => 'test', 'checkAgent' => false, 'timeout' => 86400, 'ini' => array( @@ -127,7 +127,7 @@ class CakeSessionTest extends CakeTestCase { TestCakeSession::start(); $this->assertEquals('', ini_get('session.use_trans_sid'), 'Ini value is incorrect'); $this->assertEquals('example.com', ini_get('session.referer_check'), 'Ini value is incorrect'); - $this->assertEquals('test_suite', ini_get('session.name'), 'Ini value is incorrect'); + $this->assertEquals('test', ini_get('session.name'), 'Ini value is incorrect'); } /** @@ -682,7 +682,7 @@ class CakeSessionTest extends CakeTestCase { Configure::write('Session.defaults', 'database'); Configure::write('Session.handler.table', 'sessions'); Configure::write('Session.handler.model', 'Session'); - Configure::write('Session.handler.database', 'test_suite'); + Configure::write('Session.handler.database', 'test'); TestCakeSession::init(); TestCakeSession::start(); diff --git a/cake/tests/cases/libs/cake_test_fixture.test.php b/cake/tests/cases/libs/cake_test_fixture.test.php index a56bb94cf..38af11570 100644 --- a/cake/tests/cases/libs/cake_test_fixture.test.php +++ b/cake/tests/cases/libs/cake_test_fixture.test.php @@ -84,7 +84,7 @@ class CakeTestFixtureImportFixture extends CakeTestFixture { * * @var mixed */ - public $import = array('table' => 'fixture_tests', 'connection' => 'fixture_test_suite'); + public $import = array('table' => 'fixture_tests', 'connection' => 'fixture_test'); } /** @@ -112,14 +112,14 @@ class CakeTestFixtureDefaultImportFixture extends CakeTestFixture { class FixtureImportTestModel extends Model { public $name = 'FixtureImport'; public $useTable = 'fixture_tests'; - public $useDbConfig = 'test_suite'; + public $useDbConfig = 'test'; } class FixturePrefixTest extends Model { public $name = 'FixturePrefix'; public $useTable = '_tests'; public $tablePrefix = 'fixture'; - public $useDbConfig = 'test_suite'; + public $useDbConfig = 'test'; } /** @@ -141,9 +141,9 @@ class CakeTestFixtureTest extends CakeTestCase { $this->criticDb->fullDebug = true; $dbs = ConnectionManager::enumConnectionObjects(); - if (!isset($dbs['test_suite'])) { + if (!isset($dbs['test'])) { $db = ConnectionManager::getDatasource('test'); - ConnectionManager::create('test_suite', $db->config); + ConnectionManager::create('test', $db->config); } } @@ -183,7 +183,7 @@ class CakeTestFixtureTest extends CakeTestCase { * @return void */ function testInitDbPrefix() { - $db = ConnectionManager::getDataSource('test_suite'); + $db = ConnectionManager::getDataSource('test'); $Source = new CakeTestFixtureTestFixture(); $Source->drop($db); $Source->create($db); @@ -194,18 +194,18 @@ class CakeTestFixtureTest extends CakeTestCase { $this->assertEqual(array_keys($Fixture->fields), $expected); $config = $db->config; - $config['prefix'] = 'fixture_test_suite_'; - ConnectionManager::create('fixture_test_suite', $config); + $config['prefix'] = 'fixture_test_'; + ConnectionManager::create('fixture_test', $config); $Fixture->fields = $Fixture->records = null; - $Fixture->import = array('table' => 'fixture_tests', 'connection' => 'test_suite', 'records' => true); + $Fixture->import = array('table' => 'fixture_tests', 'connection' => 'test', 'records' => true); $Fixture->init(); $this->assertEqual(count($Fixture->records), count($Source->records)); - $Fixture->create(ConnectionManager::getDataSource('fixture_test_suite')); + $Fixture->create(ConnectionManager::getDataSource('fixture_test')); $Fixture =& new CakeTestFixtureImportFixture(); $Fixture->fields = $Fixture->records = $Fixture->table = null; - $Fixture->import = array('model' => 'FixtureImportTestModel', 'connection' => 'test_suite'); + $Fixture->import = array('model' => 'FixtureImportTestModel', 'connection' => 'test'); $Fixture->init(); $this->assertEqual(array_keys($Fixture->fields), array('id', 'name', 'created')); $this->assertEqual($Fixture->table, 'fixture_tests'); @@ -213,7 +213,7 @@ class CakeTestFixtureTest extends CakeTestCase { $keys = array_flip(ClassRegistry::keys()); $this->assertFalse(array_key_exists('fixtureimporttestmodel', $keys)); - $Fixture->drop(ConnectionManager::getDataSource('fixture_test_suite')); + $Fixture->drop(ConnectionManager::getDataSource('fixture_test')); $Source->drop($db); } @@ -233,7 +233,7 @@ class CakeTestFixtureTest extends CakeTestCase { $Fixture =& new CakeTestFixtureImportFixture(); $Fixture->fields = $Fixture->records = $Fixture->table = null; - $Fixture->import = array('model' => 'FixtureImportTestModel', 'connection' => 'test_suite'); + $Fixture->import = array('model' => 'FixtureImportTestModel', 'connection' => 'test'); $Fixture->init(); $this->assertEqual(array_keys($Fixture->fields), array('id', 'name', 'created')); @@ -261,7 +261,7 @@ class CakeTestFixtureTest extends CakeTestCase { $Fixture =& new CakeTestFixtureTestFixture(); unset($Fixture->table); $Fixture->fields = $Fixture->records = null; - $Fixture->import = array('model' => 'FixturePrefixTest', 'connection' => 'test_suite', 'records' => false); + $Fixture->import = array('model' => 'FixturePrefixTest', 'connection' => 'test', 'records' => false); $Fixture->init(); $this->assertEqual($Fixture->table, 'fixture_tests'); @@ -279,11 +279,11 @@ class CakeTestFixtureTest extends CakeTestCase { */ function testImport() { $defaultDb = ConnectionManager::getDataSource('default'); - $testSuiteDb = ConnectionManager::getDataSource('test_suite'); + $testSuiteDb = ConnectionManager::getDataSource('test'); $defaultConfig = $defaultDb->config; $testSuiteConfig = $testSuiteDb->config; - ConnectionManager::create('new_test_suite', array_merge($testSuiteConfig, array('prefix' => 'new_' . $testSuiteConfig['prefix']))); - $newTestSuiteDb = ConnectionManager::getDataSource('new_test_suite'); + ConnectionManager::create('new_test', array_merge($testSuiteConfig, array('prefix' => 'new_' . $testSuiteConfig['prefix']))); + $newTestSuiteDb = ConnectionManager::getDataSource('new_test'); $Source = new CakeTestFixtureTestFixture(); $Source->create($newTestSuiteDb); @@ -293,7 +293,7 @@ class CakeTestFixtureTest extends CakeTestCase { $Fixture = new CakeTestFixtureDefaultImportFixture(); $Fixture->fields = $Fixture->records = null; - $Fixture->import = array('model' => 'FixtureImportTestModel', 'connection' => 'new_test_suite'); + $Fixture->import = array('model' => 'FixtureImportTestModel', 'connection' => 'new_test'); $Fixture->init(); $this->assertEqual(array_keys($Fixture->fields), array('id', 'name', 'created')); @@ -314,11 +314,11 @@ class CakeTestFixtureTest extends CakeTestCase { function testImportWithRecords() { $defaultDb = ConnectionManager::getDataSource('default'); - $testSuiteDb = ConnectionManager::getDataSource('test_suite'); + $testSuiteDb = ConnectionManager::getDataSource('test'); $defaultConfig = $defaultDb->config; $testSuiteConfig = $testSuiteDb->config; - ConnectionManager::create('new_test_suite', array_merge($testSuiteConfig, array('prefix' => 'new_' . $testSuiteConfig['prefix']))); - $newTestSuiteDb = ConnectionManager::getDataSource('new_test_suite'); + ConnectionManager::create('new_test', array_merge($testSuiteConfig, array('prefix' => 'new_' . $testSuiteConfig['prefix']))); + $newTestSuiteDb = ConnectionManager::getDataSource('new_test'); $Source = new CakeTestFixtureTestFixture(); $Source->create($newTestSuiteDb); @@ -329,7 +329,7 @@ class CakeTestFixtureTest extends CakeTestCase { $Fixture = new CakeTestFixtureDefaultImportFixture(); $Fixture->fields = $Fixture->records = null; $Fixture->import = array( - 'model' => 'FixtureImportTestModel', 'connection' => 'new_test_suite', 'records' => true + 'model' => 'FixtureImportTestModel', 'connection' => 'new_test', 'records' => true ); $Fixture->init(); $this->assertEqual(array_keys($Fixture->fields), array('id', 'name', 'created')); diff --git a/cake/tests/cases/libs/controller/components/acl.test.php b/cake/tests/cases/libs/controller/components/acl.test.php index 9e66bde52..0be496c15 100644 --- a/cake/tests/cases/libs/controller/components/acl.test.php +++ b/cake/tests/cases/libs/controller/components/acl.test.php @@ -30,10 +30,10 @@ class AclNodeTwoTestBase extends AclNode { /** * useDbConfig property * - * @var string 'test_suite' + * @var string 'test' * @access public */ - public $useDbConfig = 'test_suite'; + public $useDbConfig = 'test'; /** * cacheSources property @@ -356,7 +356,7 @@ class DbAclTest extends CakeTestCase { $this->_settings = Configure::read('Acl'); Configure::write('Acl.classname', 'DbAclTwoTest'); - Configure::write('Acl.database', 'test_suite'); + Configure::write('Acl.database', 'test'); $Collection = new ComponentCollection(); $this->Acl = new AclComponent($Collection); } diff --git a/cake/tests/cases/libs/controller/components/auth.test.php b/cake/tests/cases/libs/controller/components/auth.test.php index 0f47e650f..65074ec05 100644 --- a/cake/tests/cases/libs/controller/components/auth.test.php +++ b/cake/tests/cases/libs/controller/components/auth.test.php @@ -76,10 +76,10 @@ class AuthUser extends CakeTestModel { /** * useDbConfig property * - * @var string 'test_suite' + * @var string 'test' * @access public */ - public $useDbConfig = 'test_suite'; + public $useDbConfig = 'test'; /** * parentNode method @@ -155,10 +155,10 @@ class UuidUser extends CakeTestModel { /** * useDbConfig property * - * @var string 'test_suite' + * @var string 'test' * @access public */ - public $useDbConfig = 'test_suite'; + public $useDbConfig = 'test'; /** * useTable property @@ -488,7 +488,7 @@ class AuthTest extends CakeTestCase { Configure::write('Security.cipherSeed', 770011223369876); $this->_acl = Configure::read('Acl'); - Configure::write('Acl.database', 'test_suite'); + Configure::write('Acl.database', 'test'); Configure::write('Acl.classname', 'DbAcl'); $request = new CakeRequest(null, false); diff --git a/cake/tests/cases/libs/controller/components/session.test.php b/cake/tests/cases/libs/controller/components/session.test.php index 5c9d2cf44..24779d843 100644 --- a/cake/tests/cases/libs/controller/components/session.test.php +++ b/cake/tests/cases/libs/controller/components/session.test.php @@ -99,7 +99,7 @@ class SessionComponentTest extends CakeTestCase { Configure::write('Session', array( 'defaults' => 'php', 'timeout' => 100, - 'cookie' => 'test_suite' + 'cookie' => 'test' )); } diff --git a/cake/tests/cases/libs/model/behaviors/acl.test.php b/cake/tests/cases/libs/model/behaviors/acl.test.php index d688ae5eb..706a802c7 100644 --- a/cake/tests/cases/libs/model/behaviors/acl.test.php +++ b/cake/tests/cases/libs/model/behaviors/acl.test.php @@ -222,7 +222,7 @@ class AclBehaviorTest extends CakeTestCase { * @return void */ public function setUp() { - Configure::write('Acl.database', 'test_suite'); + Configure::write('Acl.database', 'test'); $this->Aco = new Aco(); $this->Aro = new Aro(); diff --git a/cake/tests/cases/libs/model/cake_schema.test.php b/cake/tests/cases/libs/model/cake_schema.test.php index 5b2bd3586..c2de62911 100644 --- a/cake/tests/cases/libs/model/cake_schema.test.php +++ b/cake/tests/cases/libs/model/cake_schema.test.php @@ -39,10 +39,10 @@ class MyAppSchema extends CakeSchema { /** * connection property * - * @var string 'test_suite' + * @var string 'test' * @access public */ - public $connection = 'test_suite'; + public $connection = 'test'; /** * comments property @@ -563,7 +563,7 @@ class CakeSchemaTest extends CakeTestCase { */ function testSchemaRead() { $read = $this->Schema->read(array( - 'connection' => 'test_suite', + 'connection' => 'test', 'name' => 'TestApp', 'models' => array('SchemaPost', 'SchemaComment', 'SchemaTag', 'SchemaDatatype') )); @@ -582,7 +582,7 @@ class CakeSchemaTest extends CakeTestCase { $this->Schema->tables['datatypes']['float_field'] ); - $db =& ConnectionManager::getDataSource('test_suite'); + $db =& ConnectionManager::getDataSource('test'); $config = $db->config; $config['prefix'] = 'schema_test_prefix_'; ConnectionManager::create('schema_prefix', $config); @@ -593,14 +593,14 @@ class CakeSchemaTest extends CakeTestCase { $SchemaPost->table = 'sts'; $SchemaPost->tablePrefix = 'po'; $read = $this->Schema->read(array( - 'connection' => 'test_suite', + 'connection' => 'test', 'name' => 'TestApp', 'models' => array('SchemaPost') )); $this->assertFalse(isset($read['tables']['missing']['posts']), 'Posts table was not read from tablePrefix %s'); $read = $this->Schema->read(array( - 'connection' => 'test_suite', + 'connection' => 'test', 'name' => 'TestApp', 'models' => array('SchemaComment', 'SchemaTag', 'SchemaPost') )); @@ -617,7 +617,7 @@ class CakeSchemaTest extends CakeTestCase { $Schema =& new CakeSchema(); $read = $Schema->read(array( - 'connection' => 'test_suite', + 'connection' => 'test', 'name' => 'TestApp', 'models' => array('SchemaPrefixAuthUser') )); @@ -640,7 +640,7 @@ class CakeSchemaTest extends CakeTestCase { $Schema =& new CakeSchema(); $Schema->plugin = 'TestPlugin'; $read = $Schema->read(array( - 'connection' => 'test_suite', + 'connection' => 'test', 'name' => 'TestApp', 'models' => true )); @@ -677,7 +677,7 @@ class CakeSchemaTest extends CakeTestCase { $fixture->insert($db2); $read = $this->Schema->read(array( - 'connection' => 'test_suite', + 'connection' => 'test', 'name' => 'TestApp', 'models' => array('SchemaCrossDatabase', 'SchemaPost') )); @@ -942,11 +942,11 @@ class CakeSchemaTest extends CakeTestCase { * @return void */ function testSchemaCreateTable() { - $db =& ConnectionManager::getDataSource('test_suite'); + $db =& ConnectionManager::getDataSource('test'); $db->cacheSources = false; $Schema =& new CakeSchema(array( - 'connection' => 'test_suite', + 'connection' => 'test', 'testdescribes' => array( 'id' => array('type' => 'integer', 'key' => 'primary'), 'int_null' => array('type' => 'integer', 'null' => true), diff --git a/cake/tests/cases/libs/model/connection_manager.test.php b/cake/tests/cases/libs/model/connection_manager.test.php index b48b328db..27f27b250 100644 --- a/cake/tests/cases/libs/model/connection_manager.test.php +++ b/cake/tests/cases/libs/model/connection_manager.test.php @@ -67,7 +67,7 @@ class ConnectionManagerTest extends CakeTestCase { $sources = ConnectionManager::enumConnectionObjects(); $this->assertTrue(count($sources) >= 1); - $connections = array('default', 'test', 'test_suite'); + $connections = array('default', 'test', 'test'); $this->assertTrue(count(array_intersect(array_keys($sources), $connections)) >= 1); } @@ -194,7 +194,7 @@ class ConnectionManagerTest extends CakeTestCase { $sources = ConnectionManager::sourceList(); $this->assertTrue(count($sources) >= 1); - $connections = array('default', 'test', 'test_suite'); + $connections = array('default', 'test', 'test'); $this->assertTrue(count(array_intersect($sources, $connections)) >= 1); } diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php index d31a61a1c..705ebaade 100644 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_mssql.test.php @@ -328,7 +328,7 @@ class DboMssqlTest extends CakeTestCase { * */ public function setUp() { - $db = ConnectionManager::getDataSource('test_suite'); + $db = ConnectionManager::getDataSource('test'); $this->db = new DboMssqlTestDb($db->config); $this->model = new MssqlTestModel(); } diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php index 0ade4be5c..6bcb0154b 100644 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_mysql.test.php @@ -172,7 +172,7 @@ class DboMysqlTest extends CakeTestCase { * */ public function setUp() { - $this->Dbo = ConnectionManager::getDataSource('test_suite'); + $this->Dbo = ConnectionManager::getDataSource('test'); if ($this->Dbo->config['driver'] !== 'mysql') { $this->markTestSkipped('The MySQL extension is not available.'); } @@ -279,7 +279,7 @@ class DboMysqlTest extends CakeTestCase { $this->Dbo->query('CREATE TABLE ' . $this->Dbo->fullTableName($tableName) . ' (id int(11) AUTO_INCREMENT, bool tinyint(1), small_int tinyint(2), primary key(id));'); $this->model = new CakeTestModel(array( - 'name' => 'Tinyint', 'table' => $tableName, 'ds' => 'test_suite' + 'name' => 'Tinyint', 'table' => $tableName, 'ds' => 'test' )); $result = $this->model->schema(); @@ -561,7 +561,7 @@ class DboMysqlTest extends CakeTestCase { $schema1 = new CakeSchema(array( 'name' => 'AlterTest1', - 'connection' => 'test_suite', + 'connection' => 'test', 'altertest' => array( 'id' => array('type' => 'integer', 'null' => false, 'default' => 0), 'name' => array('type' => 'string', 'null' => false, 'length' => 50), @@ -572,7 +572,7 @@ class DboMysqlTest extends CakeTestCase { $schema2 = new CakeSchema(array( 'name' => 'AlterTest2', - 'connection' => 'test_suite', + 'connection' => 'test', 'altertest' => array( 'id' => array('type' => 'integer', 'null' => false, 'default' => 0), 'name' => array('type' => 'string', 'null' => false, 'length' => 50), @@ -592,7 +592,7 @@ class DboMysqlTest extends CakeTestCase { // Change three indexes, delete one and add another one $schema3 = new CakeSchema(array( 'name' => 'AlterTest3', - 'connection' => 'test_suite', + 'connection' => 'test', 'altertest' => array( 'id' => array('type' => 'integer', 'null' => false, 'default' => 0), 'name' => array('type' => 'string', 'null' => false, 'length' => 50), @@ -633,7 +633,7 @@ class DboMysqlTest extends CakeTestCase { ¢îè©ÀÌ#¥⁄ã≥fi:¯Ü‚Héá¶jV∂ÓúÎL≥çÀóËıÎ…>ï≈ vFE%ÒâLFI<†µw˝±≈£7˘ç^H“≤« >Éâ*∑ÇnÖA•Ù|flêèj£:=ÿ6óUàµ5'∂®àA¬ñ∆ˆGE(gt’≈àÚyÁó«7 ‚VìöÇ√˙Ç™ k”:;kÀAõ{*¡€Î˚˚[;;"; - $model = new AppModel(array('name' => 'BinaryTest', 'ds' => 'test_suite')); + $model = new AppModel(array('name' => 'BinaryTest', 'ds' => 'test')); $model->save(compact('data')); $result = $model->find('first'); @@ -651,7 +651,7 @@ class DboMysqlTest extends CakeTestCase { $schema1 = new CakeSchema(array( 'name' => 'AlterTest1', - 'connection' => 'test_suite', + 'connection' => 'test', 'altertest' => array( 'id' => array('type' => 'integer', 'null' => false, 'default' => 0), 'name' => array('type' => 'string', 'null' => false, 'length' => 50), @@ -665,7 +665,7 @@ class DboMysqlTest extends CakeTestCase { $this->Dbo->query($this->Dbo->createSchema($schema1)); $schema2 = new CakeSchema(array( 'name' => 'AlterTest1', - 'connection' => 'test_suite', + 'connection' => 'test', 'altertest' => array( 'id' => array('type' => 'integer', 'null' => false, 'default' => 0), 'name' => array('type' => 'string', 'null' => false, 'length' => 50), @@ -698,7 +698,7 @@ class DboMysqlTest extends CakeTestCase { function testAlteringTwoTables() { $schema1 =& new CakeSchema(array( 'name' => 'AlterTest1', - 'connection' => 'test_suite', + 'connection' => 'test', 'altertest' => array( 'id' => array('type' => 'integer', 'null' => false, 'default' => 0), 'name' => array('type' => 'string', 'null' => false, 'length' => 50), @@ -710,7 +710,7 @@ class DboMysqlTest extends CakeTestCase { )); $schema2 =& new CakeSchema(array( 'name' => 'AlterTest1', - 'connection' => 'test_suite', + 'connection' => 'test', 'altertest' => array( 'id' => array('type' => 'integer', 'null' => false, 'default' => 0), 'field_two' => array('type' => 'string', 'null' => false, 'length' => 50), @@ -792,7 +792,7 @@ class DboMysqlTest extends CakeTestCase { * @return void */ function testVirtualFieldSeparators() { - $model =& new CakeTestModel(array('table' => 'binary_tests', 'ds' => 'test_suite', 'name' => 'BinaryTest')); + $model =& new CakeTestModel(array('table' => 'binary_tests', 'ds' => 'test', 'name' => 'BinaryTest')); $model->virtualFields = array( 'other__field' => 'SUM(id)' ); @@ -810,7 +810,7 @@ class DboMysqlTest extends CakeTestCase { */ function testDescribeGettingFieldParameters() { $schema =& new CakeSchema(array( - 'connection' => 'test_suite', + 'connection' => 'test', 'testdescribes' => array( 'id' => array('type' => 'integer', 'key' => 'primary'), 'stringy' => array( diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_mysqli.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_mysqli.test.php index 70d54ce4d..ceee349de 100644 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_mysqli.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_mysqli.test.php @@ -147,7 +147,7 @@ class DboMysqliTest extends CakeTestCase { * */ public function setUp() { - $this->Dbo = ConnectionManager::getDataSource('test_suite'); + $this->Dbo = ConnectionManager::getDataSource('test'); if ($this->Dbo->config['driver'] !== 'mysqli') { $this->markTestSkipped('The MySQLi extension is not available.'); } @@ -295,7 +295,7 @@ class DboMysqliTest extends CakeTestCase { * @return void */ function testFloatParsing() { - $model =& new Model(array('ds' => 'test_suite', 'table' => 'datatypes', 'name' => 'Datatype')); + $model =& new Model(array('ds' => 'test', 'table' => 'datatypes', 'name' => 'Datatype')); $result = $this->Dbo->describe($model); $this->assertEqual((string)$result['float_field']['length'], '5,2'); } diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php index 137187dd7..5dca76b29 100644 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_postgres.test.php @@ -243,7 +243,7 @@ class DboPostgresTest extends CakeTestCase { */ public function setUp() { Configure::write('Cache.disable', true); - $this->Dbo = ConnectionManager::getDataSource('test_suite'); + $this->Dbo = ConnectionManager::getDataSource('test'); $this->Dbo2 = new DboPostgresTestDb($this->Dbo->config, false); $this->skipUnless($this->Dbo->config['driver'] == 'postgres', 'PostgreSQL connection not available'); $this->model = new PostgresTestModel(); @@ -423,7 +423,7 @@ class DboPostgresTest extends CakeTestCase { */ function testLastInsertIdMultipleInsert() { $this->loadFixtures('User'); - $db1 = ConnectionManager::getDataSource('test_suite'); + $db1 = ConnectionManager::getDataSource('test'); $db2 = clone $db1; $db2->connect(); @@ -446,13 +446,13 @@ class DboPostgresTest extends CakeTestCase { * @return void */ function testSchemaScoping() { - $db1 = ConnectionManager::getDataSource('test_suite'); + $db1 = ConnectionManager::getDataSource('test'); $db1->cacheSources = false; $db1->reconnect(array('persistent' => false)); $db1->query('CREATE SCHEMA _scope_test'); $db2 = ConnectionManager::create( - 'test_suite_2', + 'test_2', array_merge($db1->config, array('driver' => 'postgres', 'schema' => '_scope_test')) ); $db2->cacheSources = false; @@ -504,7 +504,7 @@ class DboPostgresTest extends CakeTestCase { ªºnh˚ºO^∏…®[Ó“‚ÅfıÌ≥∫F!Eœ(π∑T6`¬tΩÆ0ì»rTÎ`»Ñ« ]≈åp˝)=¿Ô0∆öVÂmˇˆ„ø~¯ÁÔ∏b*fc»‡Îı„Ú}∆tœs∂Y∫ÜaÆ˙X∏~<ÿ·Ù vé1‹p¿TD∆ÔîÄ“úhˆ*Ú€îe)K –p¨ÚJ3Ÿ∞ã>ÊuNê°“√Ü ‹Ê9iÙ0˙AAEÍ ˙`∂£\'ûce•åƒX›ŸÁ´1SK{qdá"tÏ[wQ#SµBe∞∑µó…ÌV`B"Ñ≥„!è_Óφ-º*ºú¿Ë0ˆeê∂´ë+HFj…‡zvHÓN|ÔL÷ûñ3õÜ$z%sá…pÎóV38âs Çoµ•ß3†<9B·¨û~¢3)ÂxóÿÁCÕòÆ ∫Í=»ÿSπS;∆~±êÆTEp∑óÈ÷ÀuìDHÈ $ÉõæÜjû§"≤ÃONM®RËíRr{õS ∏Ê™op±W;ÂUÔ P∫kÔˇflTæ∑óflË” ÆC©Ô[≥◊HÁ˚¨hê"ÆbF?ú%h˙ˇ4xèÕ(ó2ÙáíM])Ñd|=fë-cI0ñL¢kÖêk‰Rƒ«ıÄWñ8mO3∏&√æËX¯Hó—ì]yF2»–˜ádàà‡‹Çο„≥7mªHAS∑¶.;Œx(1} _kd©.fidç48M\'àáªCp^Krí<ɉXÓıïl!Ì$N<ı∞B»G]…∂Ó¯>˛ÔbõÒπÀ•:ôO@È$pÖu‹Ê´-QqV ?V≥JÆÍqÛX8(lπï@zgÖ}Fe<ˇ‡Sñ“ÿ˜ê?6‡L∫Oß~µ –?ËeäÚ®YîÕ =Ü=¢DÁu*GvBk;)L¬N«î:flö∂≠ÇΩq„Ñm하Ë∂‚"û≥§:±≤i^ΩÑ!)Wıyŧô á„RÄ÷Òôc’≠—s™rı‚Pdêãh˘ßHVç5fifiÈF€çÌÛuçÖ/M=gëµ±ÿGû1coÔuñæ‘z®. õ∑7ÉÏÜÆ,°’H†ÍÉÌ∂7e º® íˆ⁄◊øNWK”ÂYµ‚ñé;µ¶gV-fl>µtË¥áßN2 ¯¶BaP-)eW.àôt^∏1›C∑Ö?L„&”5’4jvã–ªZ ÷+4% ´0l…»ú^°´© ûiπ∑é®óܱÒÿ‰ïˆÌ–dˆ◊Æ19rQ=Í|ı•rMæ¬;ò‰Y‰é9.” ‹˝V«ã¯∏,+ë®j*¡·/'; - $model = new AppModel(array('name' => 'BinaryTest', 'ds' => 'test_suite')); + $model = new AppModel(array('name' => 'BinaryTest', 'ds' => 'test')); $model->save(compact('data')); $result = $model->find('first'); @@ -553,7 +553,7 @@ class DboPostgresTest extends CakeTestCase { * @return void */ public function testCakeSchema() { - $db1 = ConnectionManager::getDataSource('test_suite'); + $db1 = ConnectionManager::getDataSource('test'); $db1->cacheSources = false; $db1->reconnect(array('persistent' => false)); $db1->query('CREATE TABLE ' . $db1->fullTableName('datatypes') . ' ( @@ -562,12 +562,12 @@ class DboPostgresTest extends CakeTestCase { "full_length" character varying NOT NULL, "timestamp" timestamp without time zone, date date, - CONSTRAINT test_suite_data_types_pkey PRIMARY KEY (id) + CONSTRAINT test_data_types_pkey PRIMARY KEY (id) )'); - $model = new Model(array('name' => 'Datatype', 'ds' => 'test_suite')); - $schema = new CakeSchema(array('connection' => 'test_suite')); + $model = new Model(array('name' => 'Datatype', 'ds' => 'test')); + $schema = new CakeSchema(array('connection' => 'test')); $result = $schema->read(array( - 'connection' => 'test_suite', + 'connection' => 'test', 'models' => array('Datatype') )); $schema->tables = array('datatypes' => $result['tables']['datatypes']); @@ -581,7 +581,7 @@ class DboPostgresTest extends CakeTestCase { $db1->query($result); $result2 = $schema->read(array( - 'connection' => 'test_suite', + 'connection' => 'test', 'models' => array('Datatype') )); $schema->tables = array('datatypes' => $result2['tables']['datatypes']); @@ -631,7 +631,7 @@ class DboPostgresTest extends CakeTestCase { */ function testAlterSchema() { $Old = new CakeSchema(array( - 'connection' => 'test_suite', + 'connection' => 'test', 'name' => 'AlterPosts', 'alter_posts' => array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -646,7 +646,7 @@ class DboPostgresTest extends CakeTestCase { $this->Dbo->query($this->Dbo->createSchema($Old)); $New = new CakeSchema(array( - 'connection' => 'test_suite', + 'connection' => 'test', 'name' => 'AlterPosts', 'alter_posts' => array( 'id' => array('type' => 'integer', 'key' => 'primary'), @@ -660,7 +660,7 @@ class DboPostgresTest extends CakeTestCase { )); $this->Dbo->query($this->Dbo->alterSchema($New->compare($Old), 'alter_posts')); - $model = new CakeTestModel(array('table' => 'alter_posts', 'ds' => 'test_suite')); + $model = new CakeTestModel(array('table' => 'alter_posts', 'ds' => 'test')); $result = $model->schema(); $this->assertTrue(isset($result['status'])); $this->assertFalse(isset($result['published'])); @@ -683,7 +683,7 @@ class DboPostgresTest extends CakeTestCase { $schema1 = new CakeSchema(array( 'name' => 'AlterTest1', - 'connection' => 'test_suite', + 'connection' => 'test', 'altertest' => array( 'id' => array('type' => 'integer', 'null' => false, 'default' => 0), 'name' => array('type' => 'string', 'null' => false, 'length' => 50), @@ -695,7 +695,7 @@ class DboPostgresTest extends CakeTestCase { $schema2 = new CakeSchema(array( 'name' => 'AlterTest2', - 'connection' => 'test_suite', + 'connection' => 'test', 'altertest' => array( 'id' => array('type' => 'integer', 'null' => false, 'default' => 0), 'name' => array('type' => 'string', 'null' => false, 'length' => 50), @@ -717,7 +717,7 @@ class DboPostgresTest extends CakeTestCase { // Change three indexes, delete one and add another one $schema3 = new CakeSchema(array( 'name' => 'AlterTest3', - 'connection' => 'test_suite', + 'connection' => 'test', 'altertest' => array( 'id' => array('type' => 'integer', 'null' => false, 'default' => 0), 'name' => array('type' => 'string', 'null' => false, 'length' => 50), @@ -825,7 +825,7 @@ class DboPostgresTest extends CakeTestCase { function testAlteringTwoTables() { $schema1 =& new CakeSchema(array( 'name' => 'AlterTest1', - 'connection' => 'test_suite', + 'connection' => 'test', 'altertest' => array( 'id' => array('type' => 'integer', 'null' => false, 'default' => 0), 'name' => array('type' => 'string', 'null' => false, 'length' => 50), @@ -837,7 +837,7 @@ class DboPostgresTest extends CakeTestCase { )); $schema2 =& new CakeSchema(array( 'name' => 'AlterTest1', - 'connection' => 'test_suite', + 'connection' => 'test', 'altertest' => array( 'id' => array('type' => 'integer', 'null' => false, 'default' => 0), 'field_two' => array('type' => 'string', 'null' => false, 'length' => 50), diff --git a/cake/tests/cases/libs/model/datasources/dbo/dbo_sqlite.test.php b/cake/tests/cases/libs/model/datasources/dbo/dbo_sqlite.test.php index 7affde55d..60dfb525d 100644 --- a/cake/tests/cases/libs/model/datasources/dbo/dbo_sqlite.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo/dbo_sqlite.test.php @@ -104,7 +104,7 @@ class DboSqliteTest extends CakeTestCase { */ public function setUp() { Configure::write('Cache.disable', true); - $this->Dbo = ConnectionManager::getDataSource('test_suite'); + $this->Dbo = ConnectionManager::getDataSource('test'); if ($this->Dbo->config['driver'] !== 'sqlite') { $this->markTestSkipped('The Sqlite extension is not available.'); } @@ -274,7 +274,7 @@ class DboSqliteTest extends CakeTestCase { */ function testDescribe() { $this->loadFixtures('User'); - $Model = new Model(array('name' => 'User', 'ds' => 'test_suite', 'table' => 'users')); + $Model = new Model(array('name' => 'User', 'ds' => 'test', 'table' => 'users')); $result = $this->Dbo->describe($Model); $expected = array( 'id' => array( @@ -320,7 +320,7 @@ class DboSqliteTest extends CakeTestCase { function testDescribeWithUuidPrimaryKey() { $tableName = 'uuid_tests'; $this->Dbo->query("CREATE TABLE {$tableName} (id VARCHAR(36) PRIMARY KEY, name VARCHAR, created DATETIME, modified DATETIME)"); - $Model = new Model(array('name' => 'UuidTest', 'ds' => 'test_suite', 'table' => 'uuid_tests')); + $Model = new Model(array('name' => 'UuidTest', 'ds' => 'test', 'table' => 'uuid_tests')); $result = $this->Dbo->describe($Model); $expected = array( 'type' => 'string', diff --git a/cake/tests/cases/libs/model/datasources/dbo_source.test.php b/cake/tests/cases/libs/model/datasources/dbo_source.test.php index 1f6db7687..b6e82dffd 100644 --- a/cake/tests/cases/libs/model/datasources/dbo_source.test.php +++ b/cake/tests/cases/libs/model/datasources/dbo_source.test.php @@ -1292,7 +1292,7 @@ class DboSourceTest extends CakeTestCase { $this->__config = $this->db->config; if (!class_exists('DboTest')) { - $db = ConnectionManager::getDataSource('test_suite'); + $db = ConnectionManager::getDataSource('test'); $class = get_class($db); eval("class DboTest extends $class { var \$simulated = array(); diff --git a/cake/tests/cases/libs/model/db_acl.test.php b/cake/tests/cases/libs/model/db_acl.test.php index 0909c9360..890a1f877 100644 --- a/cake/tests/cases/libs/model/db_acl.test.php +++ b/cake/tests/cases/libs/model/db_acl.test.php @@ -31,10 +31,10 @@ class DbAclNodeTestBase extends AclNode { /** * useDbConfig property * - * @var string 'test_suite' + * @var string 'test' * @access public */ - public $useDbConfig = 'test_suite'; + public $useDbConfig = 'test'; /** * cacheSources property @@ -270,7 +270,7 @@ class AclNodeTest extends CakeTestCase { */ function setUp() { Configure::write('Acl.classname', 'TestDbAcl'); - Configure::write('Acl.database', 'test_suite'); + Configure::write('Acl.database', 'test'); } /** @@ -373,7 +373,7 @@ class AclNodeTest extends CakeTestCase { */ function testNodeAliasParenting() { $Aco = new DbAcoTest(); - $db = ConnectionManager::getDataSource('test_suite'); + $db = ConnectionManager::getDataSource('test'); $db->truncate($Aco); $Aco->create(array('model' => null, 'foreign_key' => null, 'parent_id' => null, 'alias' => 'Application')); diff --git a/cake/tests/cases/libs/model/model_integration.test.php b/cake/tests/cases/libs/model/model_integration.test.php index fb87a32d1..dc1b5f4d6 100644 --- a/cake/tests/cases/libs/model/model_integration.test.php +++ b/cake/tests/cases/libs/model/model_integration.test.php @@ -706,7 +706,7 @@ class ModelIntegrationTest extends BaseModelTest { $expected = array('Apple'=> array('mytime'=> '03:04:04')); $this->assertEqual($TestModel->data, $expected); - $db = ConnectionManager::getDataSource('test_suite'); + $db = ConnectionManager::getDataSource('test'); $data = array(); $data['Apple']['mytime'] = $db->expression('NOW()'); $TestModel->data = null; @@ -883,7 +883,7 @@ class ModelIntegrationTest extends BaseModelTest { $expected = array('Apple'=> array('date'=> '2006-12-25')); $this->assertEqual($TestModel->data, $expected); - $db = ConnectionManager::getDataSource('test_suite'); + $db = ConnectionManager::getDataSource('test'); $data = array(); $data['Apple']['modified'] = $db->expression('NOW()'); $TestModel->data = null; @@ -1328,9 +1328,9 @@ class ModelIntegrationTest extends BaseModelTest { */ function testConstructWithAlternateDataSource() { $TestModel = ClassRegistry::init(array( - 'class' => 'DoesntMatter', 'ds' => 'test_suite', 'table' => false + 'class' => 'DoesntMatter', 'ds' => 'test', 'table' => false )); - $this->assertEqual('test_suite', $TestModel->useDbConfig); + $this->assertEqual('test', $TestModel->useDbConfig); //deprecated but test it anyway $NewVoid = new TheVoid(null, false, 'other'); diff --git a/cake/tests/cases/libs/model/model_read.test.php b/cake/tests/cases/libs/model/model_read.test.php index 83d52ca22..9462b7f2a 100755 --- a/cake/tests/cases/libs/model/model_read.test.php +++ b/cake/tests/cases/libs/model/model_read.test.php @@ -78,7 +78,7 @@ class ModelReadTest extends BaseModelTest { * @return void */ function testGroupBy() { - $db = ConnectionManager::getDataSource('test_suite'); + $db = ConnectionManager::getDataSource('test'); $isStrictGroupBy = in_array($db->config['driver'], array('postgres', 'oracle')); $message = '%s Postgres and Oracle have strict GROUP BY and are incompatible with this test.'; @@ -6286,7 +6286,7 @@ class ModelReadTest extends BaseModelTest { ); $this->assertEqual($result, $expected); - $db = ConnectionManager::getDataSource('test_suite'); + $db = ConnectionManager::getDataSource('test'); if ($db->config['driver'] == 'mysql') { $result = $TestModel->find('list', array( 'order' => array('FIELD(Article.id, 3, 2) ASC', 'Article.title ASC') @@ -6666,7 +6666,7 @@ class ModelReadTest extends BaseModelTest { return; } $this->loadFixtures('Project'); - $db = ConnectionManager::getDataSource('test_suite'); + $db = ConnectionManager::getDataSource('test'); $TestModel = new Project(); $result = $TestModel->find('count', array('conditions' => array( diff --git a/cake/tests/cases/libs/model/models.php b/cake/tests/cases/libs/model/models.php index b23b4daf1..83107b97d 100644 --- a/cake/tests/cases/libs/model/models.php +++ b/cake/tests/cases/libs/model/models.php @@ -907,7 +907,7 @@ class Post extends CakeTestModel { } function afterFind($results) { - $this->useDbConfig = 'test_suite'; + $this->useDbConfig = 'test'; return $results; } } diff --git a/cake/tests/cases/libs/sanitize.test.php b/cake/tests/cases/libs/sanitize.test.php index 6bed4f586..c002d272f 100644 --- a/cake/tests/cases/libs/sanitize.test.php +++ b/cake/tests/cases/libs/sanitize.test.php @@ -100,28 +100,28 @@ class SanitizeTest extends CakeTestCase { * @return void */ function testEscapeAlphaNumeric() { - $resultAlpha = Sanitize::escape('abc', 'test_suite'); + $resultAlpha = Sanitize::escape('abc', 'test'); $this->assertEqual($resultAlpha, 'abc'); - $resultNumeric = Sanitize::escape('123', 'test_suite'); + $resultNumeric = Sanitize::escape('123', 'test'); $this->assertEqual($resultNumeric, '123'); - $resultNumeric = Sanitize::escape(1234, 'test_suite'); + $resultNumeric = Sanitize::escape(1234, 'test'); $this->assertEqual($resultNumeric, 1234); - $resultNumeric = Sanitize::escape(1234.23, 'test_suite'); + $resultNumeric = Sanitize::escape(1234.23, 'test'); $this->assertEqual($resultNumeric, 1234.23); - $resultNumeric = Sanitize::escape('#1234.23', 'test_suite'); + $resultNumeric = Sanitize::escape('#1234.23', 'test'); $this->assertEqual($resultNumeric, '#1234.23'); - $resultNull = Sanitize::escape(null, 'test_suite'); + $resultNull = Sanitize::escape(null, 'test'); $this->assertEqual($resultNull, null); - $resultNull = Sanitize::escape(false, 'test_suite'); + $resultNull = Sanitize::escape(false, 'test'); $this->assertEqual($resultNull, false); - $resultNull = Sanitize::escape(true, 'test_suite'); + $resultNull = Sanitize::escape(true, 'test'); $this->assertEqual($resultNull, true); } @@ -134,42 +134,42 @@ class SanitizeTest extends CakeTestCase { function testClean() { $string = 'test & "quote" \'other\' ;.$ symbol.' . "\r" . 'another line'; $expected = 'test & "quote" 'other' ;.$ symbol.another line'; - $result = Sanitize::clean($string, array('connection' => 'test_suite')); + $result = Sanitize::clean($string, array('connection' => 'test')); $this->assertEqual($result, $expected); $string = 'test & "quote" \'other\' ;.$ symbol.' . "\r" . 'another line'; - $expected = 'test & ' . Sanitize::escape('"quote"', 'test_suite') . ' ' . Sanitize::escape('\'other\'', 'test_suite') . ' ;.$ symbol.another line'; - $result = Sanitize::clean($string, array('encode' => false, 'connection' => 'test_suite')); + $expected = 'test & ' . Sanitize::escape('"quote"', 'test') . ' ' . Sanitize::escape('\'other\'', 'test') . ' ;.$ symbol.another line'; + $result = Sanitize::clean($string, array('encode' => false, 'connection' => 'test')); $this->assertEqual($result, $expected); $string = 'test & "quote" \'other\' ;.$ \\$ symbol.' . "\r" . 'another line'; $expected = 'test & "quote" \'other\' ;.$ $ symbol.another line'; - $result = Sanitize::clean($string, array('encode' => false, 'escape' => false, 'connection' => 'test_suite')); + $result = Sanitize::clean($string, array('encode' => false, 'escape' => false, 'connection' => 'test')); $this->assertEqual($result, $expected); $string = 'test & "quote" \'other\' ;.$ \\$ symbol.' . "\r" . 'another line'; $expected = 'test & "quote" \'other\' ;.$ \\$ symbol.another line'; - $result = Sanitize::clean($string, array('encode' => false, 'escape' => false, 'dollar' => false, 'connection' => 'test_suite')); + $result = Sanitize::clean($string, array('encode' => false, 'escape' => false, 'dollar' => false, 'connection' => 'test')); $this->assertEqual($result, $expected); $string = 'test & "quote" \'other\' ;.$ symbol.' . "\r" . 'another line'; $expected = 'test & "quote" \'other\' ;.$ symbol.' . "\r" . 'another line'; - $result = Sanitize::clean($string, array('encode' => false, 'escape' => false, 'carriage' => false, 'connection' => 'test_suite')); + $result = Sanitize::clean($string, array('encode' => false, 'escape' => false, 'carriage' => false, 'connection' => 'test')); $this->assertEqual($result, $expected); $array = array(array('test & "quote" \'other\' ;.$ symbol.' . "\r" . 'another line')); $expected = array(array('test & "quote" 'other' ;.$ symbol.another line')); - $result = Sanitize::clean($array, array('connection' => 'test_suite')); + $result = Sanitize::clean($array, array('connection' => 'test')); $this->assertEqual($result, $expected); $array = array(array('test & "quote" \'other\' ;.$ \\$ symbol.' . "\r" . 'another line')); $expected = array(array('test & "quote" \'other\' ;.$ $ symbol.another line')); - $result = Sanitize::clean($array, array('encode' => false, 'escape' => false, 'connection' => 'test_suite')); + $result = Sanitize::clean($array, array('encode' => false, 'escape' => false, 'connection' => 'test')); $this->assertEqual($result, $expected); $array = array(array('test odd Ä spacesé')); $expected = array(array('test odd Ä spacesé')); - $result = Sanitize::clean($array, array('odd_spaces' => false, 'escape' => false, 'connection' => 'test_suite')); + $result = Sanitize::clean($array, array('odd_spaces' => false, 'escape' => false, 'connection' => 'test')); $this->assertEqual($result, $expected); $array = array(array('\\$', array('key' => 'test & "quote" \'other\' ;.$ \\$ symbol.' . "\r" . 'another line'))); diff --git a/cake/tests/cases/libs/session/database_session.test.php b/cake/tests/cases/libs/session/database_session.test.php index 24d12b3b6..309994353 100644 --- a/cake/tests/cases/libs/session/database_session.test.php +++ b/cake/tests/cases/libs/session/database_session.test.php @@ -52,7 +52,7 @@ class DatabaseSessionTest extends CakeTestCase { self::$_sessionBackup = Configure::read('Session'); Configure::write('Session.handler', array( 'model' => 'SessionTestModel', - 'database' => 'test_suite', + 'database' => 'test', 'table' => 'sessions' )); Configure::write('Session.timeout', 100); @@ -98,7 +98,7 @@ class DatabaseSessionTest extends CakeTestCase { $session = ClassRegistry::getObject('session'); $this->assertType('SessionTestModel', $session); $this->assertEquals('Session', $session->alias); - $this->assertEquals('test_suite', $session->useDbConfig); + $this->assertEquals('test', $session->useDbConfig); } /** diff --git a/cake/tests/lib/cake_test_fixture.php b/cake/tests/lib/cake_test_fixture.php index 9faf314c7..7354cf880 100644 --- a/cake/tests/lib/cake_test_fixture.php +++ b/cake/tests/lib/cake_test_fixture.php @@ -53,7 +53,7 @@ class CakeTestFixture { */ public function __construct() { App::import('Model', 'CakeSchema'); - $this->Schema = new CakeSchema(array('name' => 'TestSuite', 'connection' => 'test_suite')); + $this->Schema = new CakeSchema(array('name' => 'TestSuite', 'connection' => 'test')); $this->init(); } @@ -77,7 +77,7 @@ class CakeTestFixture { $this->fields = $model->schema(true); $this->fields[$model->primaryKey]['key'] = 'primary'; $this->table = $db->fullTableName($model, false); - ClassRegistry::config(array('ds' => 'test_suite')); + ClassRegistry::config(array('ds' => 'test')); ClassRegistry::flush(); } elseif (isset($import['table'])) { $model = new Model(null, $import['table'], $import['connection']); diff --git a/cake/tests/test_app/plugins/test_plugin/models/test_plugin_auth_user.php b/cake/tests/test_app/plugins/test_plugin/models/test_plugin_auth_user.php index c6ad3b1e3..bfd6bb938 100644 --- a/cake/tests/test_app/plugins/test_plugin/models/test_plugin_auth_user.php +++ b/cake/tests/test_app/plugins/test_plugin/models/test_plugin_auth_user.php @@ -39,8 +39,8 @@ class TestPluginAuthUser extends TestPluginAppModel { /** * useDbConfig property * - * @var string 'test_suite' + * @var string 'test' * @access public */ - public $useDbConfig = 'test_suite'; + public $useDbConfig = 'test'; }