mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge branch '2.0' of github.com:cakephp/cakephp into 2.0
This commit is contained in:
commit
0ca8af2c22
4 changed files with 11 additions and 8 deletions
|
@ -290,6 +290,10 @@ class Sqlite extends DboSource {
|
|||
$selects = array('seqno', 'cid', 'name');
|
||||
}
|
||||
while ($j < $num_fields) {
|
||||
if (!isset($selects[$j])) {
|
||||
$j++;
|
||||
continue;
|
||||
}
|
||||
if (preg_match('/\bAS\s+(.*)/i', $selects[$j], $matches)) {
|
||||
$columnName = trim($matches[1],'"');
|
||||
} else {
|
||||
|
|
|
@ -615,6 +615,7 @@ class DboSourceTest extends CakeTestCase {
|
|||
/**
|
||||
* testLog method
|
||||
*
|
||||
* @outputBuffering enabled
|
||||
* @return void
|
||||
*/
|
||||
public function testLog() {
|
||||
|
|
|
@ -345,17 +345,15 @@ class ModelReadTest extends BaseModelTest {
|
|||
$query .= ' WHERE ' . $this->db->fullTableName('articles');
|
||||
$query .= '.published = ? AND ' . $this->db->fullTableName('articles') . '.user_id = ?';
|
||||
$params = array('Y');
|
||||
$this->expectError();
|
||||
|
||||
ob_start();
|
||||
$result = $Article->query($query, $params);
|
||||
ob_end_clean();
|
||||
$this->assertEqual($result, null);
|
||||
$this->assertEmpty($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* testVeryStrangeUseCase method
|
||||
*
|
||||
* @expectedException PDOException
|
||||
* @return void
|
||||
*/
|
||||
public function testVeryStrangeUseCase() {
|
||||
|
@ -368,11 +366,8 @@ class ModelReadTest extends BaseModelTest {
|
|||
$this->db->fullTableName('articles') . '.user_id', '3',
|
||||
$this->db->fullTableName('articles') . '.published', 'Y'
|
||||
);
|
||||
$this->expectError();
|
||||
|
||||
ob_start();
|
||||
$result = $Article->query($query, $param);
|
||||
ob_end_clean();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -181,7 +181,10 @@ class CakeTestFixtureTest extends CakeTestCase {
|
|||
* @return void
|
||||
*/
|
||||
public function setUp() {
|
||||
$this->criticDb = $this->getMock('DboSource');
|
||||
$methods = array_diff(get_class_methods('DboSource'), array('enabled'));
|
||||
$methods[] = 'connect';
|
||||
|
||||
$this->criticDb = $this->getMock('DboSource', $methods);
|
||||
$this->criticDb->fullDebug = true;
|
||||
$this->db = ConnectionManager::getDataSource('test');
|
||||
$this->_backupConfig = $this->db->config;
|
||||
|
|
Loading…
Reference in a new issue