mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fix tests to run when database name is not cakephp_test
This commit is contained in:
parent
2bea29d07c
commit
4aa0df8370
2 changed files with 16 additions and 8 deletions
|
@ -1455,6 +1455,8 @@ class TranslateBehaviorTest extends CakeTestCase {
|
|||
|
||||
public function testBeforeFindAllI18nConditions() {
|
||||
$this->skipIf(!$this->db instanceof Mysql, 'This test is only compatible with Mysql.');
|
||||
$dbName = $this->db->config['database'];
|
||||
|
||||
$this->loadFixtures('TranslateArticle', 'TranslatedArticle', 'User');
|
||||
$TestModel = new TranslatedArticle();
|
||||
$TestModel->cacheQueries = false;
|
||||
|
@ -1471,7 +1473,7 @@ class TranslateBehaviorTest extends CakeTestCase {
|
|||
'table' => (object)array(
|
||||
'tablePrefix' => '',
|
||||
'table' => 'article_i18n',
|
||||
'schemaName' => 'cakephp_test',
|
||||
'schemaName' => $dbName,
|
||||
),
|
||||
'conditions' => array(
|
||||
'TranslatedArticle.id' => (object)array(
|
||||
|
@ -1489,7 +1491,7 @@ class TranslateBehaviorTest extends CakeTestCase {
|
|||
'table' => (object)array(
|
||||
'tablePrefix' => '',
|
||||
'table' => 'article_i18n',
|
||||
'schemaName' => 'cakephp_test',
|
||||
'schemaName' => $dbName,
|
||||
),
|
||||
'conditions' => array(
|
||||
'TranslatedArticle.id' => (object)array(
|
||||
|
@ -1537,6 +1539,8 @@ class TranslateBehaviorTest extends CakeTestCase {
|
|||
|
||||
public function testBeforeFindCountI18nConditions() {
|
||||
$this->skipIf(!$this->db instanceof Mysql, 'This test is only compatible with Mysql.');
|
||||
$dbName = $this->db->config['database'];
|
||||
|
||||
$this->loadFixtures('TranslateArticle', 'TranslatedArticle', 'User');
|
||||
$TestModel = new TranslatedArticle();
|
||||
$TestModel->cacheQueries = false;
|
||||
|
@ -1553,7 +1557,7 @@ class TranslateBehaviorTest extends CakeTestCase {
|
|||
'table' => (object)array(
|
||||
'tablePrefix' => '',
|
||||
'table' => 'article_i18n',
|
||||
'schemaName' => 'cakephp_test',
|
||||
'schemaName' => $dbName,
|
||||
),
|
||||
'conditions' => array(
|
||||
'`TranslatedArticle`.`id`' => (object)array(
|
||||
|
@ -1570,7 +1574,7 @@ class TranslateBehaviorTest extends CakeTestCase {
|
|||
'table' => (object)array(
|
||||
'tablePrefix' => '',
|
||||
'table' => 'article_i18n',
|
||||
'schemaName' => 'cakephp_test',
|
||||
'schemaName' => $dbName,
|
||||
),
|
||||
'conditions' => array(
|
||||
'TranslatedArticle.id' => (object)array(
|
||||
|
|
|
@ -6486,6 +6486,8 @@ class ModelReadTest extends BaseModelTest {
|
|||
|
||||
public function testBuildQueryAllI18nConditions() {
|
||||
$this->skipIf(!$this->db instanceof Mysql, 'This test is only compatible with Mysql.');
|
||||
$dbName = $this->db->config['database'];
|
||||
|
||||
$this->loadFixtures('TranslateArticle', 'TranslatedArticle', 'User');
|
||||
$TestModel = new TranslatedArticle();
|
||||
$TestModel->cacheQueries = false;
|
||||
|
@ -6502,7 +6504,7 @@ class ModelReadTest extends BaseModelTest {
|
|||
'table' => (object)array(
|
||||
'tablePrefix' => '',
|
||||
'table' => 'article_i18n',
|
||||
'schemaName' => 'cakephp_test',
|
||||
'schemaName' => $dbName
|
||||
),
|
||||
'conditions' => array(
|
||||
'TranslatedArticle.id' => (object)array(
|
||||
|
@ -6520,7 +6522,7 @@ class ModelReadTest extends BaseModelTest {
|
|||
'table' => (object)array(
|
||||
'tablePrefix' => '',
|
||||
'table' => 'article_i18n',
|
||||
'schemaName' => 'cakephp_test',
|
||||
'schemaName' => $dbName
|
||||
),
|
||||
'conditions' => array(
|
||||
'TranslatedArticle.id' => (object)array(
|
||||
|
@ -6556,6 +6558,8 @@ class ModelReadTest extends BaseModelTest {
|
|||
|
||||
public function testBuildQueryCountI18nConditions() {
|
||||
$this->skipIf(!$this->db instanceof Mysql, 'This test is only compatible with Mysql.');
|
||||
$dbName = $this->db->config['database'];
|
||||
j
|
||||
$this->loadFixtures('TranslateArticle', 'TranslatedArticle', 'User');
|
||||
$TestModel = new TranslatedArticle();
|
||||
$TestModel->cacheQueries = false;
|
||||
|
@ -6572,7 +6576,7 @@ class ModelReadTest extends BaseModelTest {
|
|||
'table' => (object)array(
|
||||
'tablePrefix' => '',
|
||||
'table' => 'article_i18n',
|
||||
'schemaName' => 'cakephp_test',
|
||||
'schemaName' => $dbName
|
||||
),
|
||||
'conditions' => array(
|
||||
'`TranslatedArticle`.`id`' => (object)array(
|
||||
|
@ -6589,7 +6593,7 @@ class ModelReadTest extends BaseModelTest {
|
|||
'table' => (object)array(
|
||||
'tablePrefix' => '',
|
||||
'table' => 'article_i18n',
|
||||
'schemaName' => 'cakephp_test',
|
||||
'schemaName' => $dbName
|
||||
),
|
||||
'conditions' => array(
|
||||
'TranslatedArticle.id' => (object)array(
|
||||
|
|
Loading…
Reference in a new issue