Skip to content
Permalink
Browse files

Fix tests to run when database name is not cakephp_test

  • Loading branch information...
markstory committed Sep 9, 2018
1 parent 2bea29d commit 4aa0df8370ebcea39906981f3c1248855fd26880
@@ -1455,6 +1455,8 @@ public function testNoExtraRowsForAssociatedTranslations() {
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 @@ public function testBeforeFindAllI18nConditions() {
'table' => (object)array(
'tablePrefix' => '',
'table' => 'article_i18n',
'schemaName' => 'cakephp_test',
'schemaName' => $dbName,
),
'conditions' => array(
'TranslatedArticle.id' => (object)array(
@@ -1489,7 +1491,7 @@ public function testBeforeFindAllI18nConditions() {
'table' => (object)array(
'tablePrefix' => '',
'table' => 'article_i18n',
'schemaName' => 'cakephp_test',
'schemaName' => $dbName,
),
'conditions' => array(
'TranslatedArticle.id' => (object)array(
@@ -1537,6 +1539,8 @@ public function testBeforeFindAllI18nConditions() {
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 @@ public function testBeforeFindCountI18nConditions() {
'table' => (object)array(
'tablePrefix' => '',
'table' => 'article_i18n',
'schemaName' => 'cakephp_test',
'schemaName' => $dbName,
),
'conditions' => array(
'`TranslatedArticle`.`id`' => (object)array(
@@ -1570,7 +1574,7 @@ public function testBeforeFindCountI18nConditions() {
'table' => (object)array(
'tablePrefix' => '',
'table' => 'article_i18n',
'schemaName' => 'cakephp_test',
'schemaName' => $dbName,
),
'conditions' => array(
'TranslatedArticle.id' => (object)array(
@@ -6486,6 +6486,8 @@ public function testBuildQuery() {
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 @@ public function testBuildQueryAllI18nConditions() {
'table' => (object)array(
'tablePrefix' => '',
'table' => 'article_i18n',
'schemaName' => 'cakephp_test',
'schemaName' => $dbName
),
'conditions' => array(
'TranslatedArticle.id' => (object)array(
@@ -6520,7 +6522,7 @@ public function testBuildQueryAllI18nConditions() {
'table' => (object)array(
'tablePrefix' => '',
'table' => 'article_i18n',
'schemaName' => 'cakephp_test',
'schemaName' => $dbName
),
'conditions' => array(
'TranslatedArticle.id' => (object)array(
@@ -6556,6 +6558,8 @@ public function testBuildQueryAllI18nConditions() {
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 @@ public function testBuildQueryCountI18nConditions() {
'table' => (object)array(
'tablePrefix' => '',
'table' => 'article_i18n',
'schemaName' => 'cakephp_test',
'schemaName' => $dbName
),
'conditions' => array(
'`TranslatedArticle`.`id`' => (object)array(
@@ -6589,7 +6593,7 @@ public function testBuildQueryCountI18nConditions() {
'table' => (object)array(
'tablePrefix' => '',
'table' => 'article_i18n',
'schemaName' => 'cakephp_test',
'schemaName' => $dbName
),
'conditions' => array(
'TranslatedArticle.id' => (object)array(

0 comments on commit 4aa0df8

Please sign in to comment.
You can’t perform that action at this time.