mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
fixing questionable test cases
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7522 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
fa4c69fb29
commit
bae3424fb2
2 changed files with 6 additions and 6 deletions
|
@ -1195,7 +1195,7 @@ class DboSourceTest extends CakeTestCase {
|
|||
$config = array_merge($this->__config, array('driver' => 'test'));
|
||||
$test =& ConnectionManager::create('quoteTest', $config);
|
||||
|
||||
$this->Model =& new Article2(array('name' => 'Article', 'ds' => 'quoteTest'));
|
||||
$this->Model =& new Article2(array('alias' => 'Article', 'ds' => 'quoteTest'));
|
||||
$this->Model->setDataSource('quoteTest');
|
||||
|
||||
$this->assertEqual($this->Model->escapeField(), '`Article`.`id`');
|
||||
|
@ -2301,7 +2301,7 @@ class DboSourceTest extends CakeTestCase {
|
|||
function testArrayConditionsParsing() {
|
||||
$result = $this->testDb->conditions(array('Stereo.type' => 'in dash speakers'));
|
||||
$this->assertPattern("/^\s+WHERE\s+`Stereo`.`type`\s+=\s+'in dash speakers'/", $result);
|
||||
|
||||
|
||||
$result = $this->testDb->conditions(array('Candy.name LIKE' => 'a', 'HardCandy.name LIKE' => 'c'));
|
||||
$this->assertPattern("/^\s+WHERE\s+`Candy`.`name` LIKE\s+'a'\s+AND\s+`HardCandy`.`name`\s+LIKE\s+'c'/", $result);
|
||||
|
||||
|
|
|
@ -656,7 +656,7 @@ class ModelTest extends CakeTestCase {
|
|||
$expected = 'TestAlias';
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$TestModel =& new TestAlias(array('alias' => 'AnotherTest'));
|
||||
$TestModel =& new Test(array('alias' => 'AnotherTest'));
|
||||
$result = $TestModel->alias;
|
||||
$expected = 'AnotherTest';
|
||||
$this->assertEqual($result, $expected);
|
||||
|
@ -5051,18 +5051,18 @@ class ModelTest extends CakeTestCase {
|
|||
$TestModel->setDataSource('database2');
|
||||
$this->assertEqual($db2->fullTableName($TestModel, false), 'apples');
|
||||
$this->assertEqual($db1->fullTableName($TestModel, false), 'apples');
|
||||
|
||||
|
||||
$TestModel->tablePrefix = null;
|
||||
$TestModel->setDataSource('database1');
|
||||
$this->assertEqual($db2->fullTableName($TestModel, false), 'aaa_apples');
|
||||
$this->assertEqual($db1->fullTableName($TestModel, false), 'aaa_apples');
|
||||
|
||||
|
||||
$TestModel->tablePrefix = false;
|
||||
$TestModel->setDataSource('database2');
|
||||
$this->assertEqual($db2->fullTableName($TestModel, false), 'apples');
|
||||
$this->assertEqual($db1->fullTableName($TestModel, false), 'apples');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* testDynamicBehaviorAttachment method
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue