mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
fixed code style, skipped pgsql and sqlite incompartible tests
This commit is contained in:
parent
794ce22f37
commit
d72c2d7e0e
3 changed files with 14 additions and 10 deletions
|
@ -251,13 +251,13 @@ class TranslateBehavior extends ModelBehavior {
|
||||||
return $this->_getConditionFields($Model, $query['conditions']);
|
return $this->_getConditionFields($Model, $query['conditions']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extracts condition field names recursively.
|
* Extracts condition field names recursively.
|
||||||
*
|
*
|
||||||
* @param Model $Model The model being read.
|
* @param Model $Model The model being read.
|
||||||
* @param array $conditions The conditions array.
|
* @param array $conditions The conditions array.
|
||||||
* @return array The list of condition fields.
|
* @return array The list of condition fields.
|
||||||
*/
|
*/
|
||||||
protected function _getConditionFields(Model $Model, $conditions) {
|
protected function _getConditionFields(Model $Model, $conditions) {
|
||||||
$conditionFields = array();
|
$conditionFields = array();
|
||||||
foreach ($conditions as $col => $val) {
|
foreach ($conditions as $col => $val) {
|
||||||
|
|
|
@ -1444,6 +1444,7 @@ class TranslateBehaviorTest extends CakeTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testBeforeFindAllI18nConditions() {
|
public function testBeforeFindAllI18nConditions() {
|
||||||
|
$this->skipIf(!$this->db instanceof Mysql, 'This test is only compatible with Mysql.');
|
||||||
$this->loadFixtures('TranslateArticle', 'TranslatedArticle', 'User');
|
$this->loadFixtures('TranslateArticle', 'TranslatedArticle', 'User');
|
||||||
$TestModel = new TranslatedArticle();
|
$TestModel = new TranslatedArticle();
|
||||||
$TestModel->cacheQueries = false;
|
$TestModel->cacheQueries = false;
|
||||||
|
@ -1525,6 +1526,7 @@ class TranslateBehaviorTest extends CakeTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testBeforeFindCountI18nConditions() {
|
public function testBeforeFindCountI18nConditions() {
|
||||||
|
$this->skipIf(!$this->db instanceof Mysql, 'This test is only compatible with Mysql.');
|
||||||
$this->loadFixtures('TranslateArticle', 'TranslatedArticle', 'User');
|
$this->loadFixtures('TranslateArticle', 'TranslatedArticle', 'User');
|
||||||
$TestModel = new TranslatedArticle();
|
$TestModel = new TranslatedArticle();
|
||||||
$TestModel->cacheQueries = false;
|
$TestModel->cacheQueries = false;
|
||||||
|
@ -1581,7 +1583,7 @@ class TranslateBehaviorTest extends CakeTestCase {
|
||||||
'callbacks' => true,
|
'callbacks' => true,
|
||||||
'recursive' => 0,
|
'recursive' => 0,
|
||||||
);
|
);
|
||||||
$query= array(
|
$query = array(
|
||||||
'conditions' => array(
|
'conditions' => array(
|
||||||
'NOT' => array(
|
'NOT' => array(
|
||||||
'I18n__title.content' => '',
|
'I18n__title.content' => '',
|
||||||
|
|
|
@ -6426,6 +6426,7 @@ class ModelReadTest extends BaseModelTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testBuildQueryAllI18nConditions() {
|
public function testBuildQueryAllI18nConditions() {
|
||||||
|
$this->skipIf(!$this->db instanceof Mysql, 'This test is only compatible with Mysql.');
|
||||||
$this->loadFixtures('TranslateArticle', 'TranslatedArticle', 'User');
|
$this->loadFixtures('TranslateArticle', 'TranslatedArticle', 'User');
|
||||||
$TestModel = new TranslatedArticle();
|
$TestModel = new TranslatedArticle();
|
||||||
$TestModel->cacheQueries = false;
|
$TestModel->cacheQueries = false;
|
||||||
|
@ -6483,7 +6484,7 @@ class ModelReadTest extends BaseModelTest {
|
||||||
'callbacks' => true,
|
'callbacks' => true,
|
||||||
'recursive' => 0,
|
'recursive' => 0,
|
||||||
);
|
);
|
||||||
$query= array(
|
$query = array(
|
||||||
'recursive' => 0,
|
'recursive' => 0,
|
||||||
'conditions' => array(
|
'conditions' => array(
|
||||||
'NOT' => array('I18n__title.content' => ''),
|
'NOT' => array('I18n__title.content' => ''),
|
||||||
|
@ -6495,6 +6496,7 @@ class ModelReadTest extends BaseModelTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testBuildQueryCountI18nConditions() {
|
public function testBuildQueryCountI18nConditions() {
|
||||||
|
$this->skipIf(!$this->db instanceof Mysql, 'This test is only compatible with Mysql.');
|
||||||
$this->loadFixtures('TranslateArticle', 'TranslatedArticle', 'User');
|
$this->loadFixtures('TranslateArticle', 'TranslatedArticle', 'User');
|
||||||
$TestModel = new TranslatedArticle();
|
$TestModel = new TranslatedArticle();
|
||||||
$TestModel->cacheQueries = false;
|
$TestModel->cacheQueries = false;
|
||||||
|
@ -6551,7 +6553,7 @@ class ModelReadTest extends BaseModelTest {
|
||||||
'callbacks' => true,
|
'callbacks' => true,
|
||||||
'recursive' => 0,
|
'recursive' => 0,
|
||||||
);
|
);
|
||||||
$query= array(
|
$query = array(
|
||||||
'recursive' => 0,
|
'recursive' => 0,
|
||||||
'conditions' => array(
|
'conditions' => array(
|
||||||
'NOT' => array('I18n__title.content' => ''),
|
'NOT' => array('I18n__title.content' => ''),
|
||||||
|
|
Loading…
Reference in a new issue