Removing all uses of the test_suite connection in the test cases

This commit is contained in:
José Lorenzo Rodríguez 2010-09-19 22:28:30 -04:30 committed by mark_story
parent 9d2e4b1b04
commit 5c3b4cfcc4
30 changed files with 201 additions and 201 deletions

View file

@ -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';
}
/**

View file

@ -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));

View file

@ -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));

View file

@ -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');

View file

@ -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';

View file

@ -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');

View file

@ -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')

View file

@ -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;

View file

@ -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();

View file

@ -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'));

View file

@ -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);
}

View file

@ -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);

View file

@ -99,7 +99,7 @@ class SessionComponentTest extends CakeTestCase {
Configure::write('Session', array(
'defaults' => 'php',
'timeout' => 100,
'cookie' => 'test_suite'
'cookie' => 'test'
));
}

View file

@ -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();

View file

@ -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),

View file

@ -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);
}

View file

@ -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();
}

View file

@ -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:¯Üá¶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(

View file

@ -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');
}

View file

@ -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!(π∑T6`¬tΩÆ0ì»rTÎ`»Ñ«
]≈åp˝)=¿Ô0∆öVÂmˇˆ„ø~¯ÁÔ∏b*fc»‡Îı„Ú}∆tœs∂Y∫ÜaÆ˙X∏~<ÿ·Ù vé1p¿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<j∂™œ%âÏ—>@È$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û1coÔuñæ. õ∑7ÉÏÜÆ,°H†ÍÉÌ∂7e º® íˆ◊øNWK”ÂYµñé;µ¶gV->µtË¥áßN2 ¯¶BaP-)eW.àôt^∏1C∑Ö?L„&”54jvãª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),

View file

@ -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',

View file

@ -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();

View file

@ -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'));

View file

@ -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');

View file

@ -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(

View file

@ -907,7 +907,7 @@ class Post extends CakeTestModel {
}
function afterFind($results) {
$this->useDbConfig = 'test_suite';
$this->useDbConfig = 'test';
return $results;
}
}

View file

@ -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 &amp; &quot;quote&quot; &#039;other&#039; ;.$ 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 &amp; &quot;quote&quot; &#039;other&#039; ;.$ 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 &Auml; spaces&eacute;'));
$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')));

View file

@ -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);
}
/**

View file

@ -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']);

View file

@ -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';
}