mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
updating multidb tests to use ConnectionManager
This commit is contained in:
parent
a88ca54a8d
commit
d77f9aacde
1 changed files with 6 additions and 6 deletions
|
@ -281,9 +281,9 @@ class ModelIntegrationTest extends BaseModelTest {
|
|||
* or one connection will step on the other.
|
||||
*/
|
||||
public function testCrossDatabaseJoins() {
|
||||
$config = new DATABASE_CONFIG();
|
||||
$config = ConnectionManager::enumConnectionObjects();
|
||||
|
||||
$skip = (!isset($config->test) || !isset($config->test2));
|
||||
$skip = (!isset($config['test']) || !isset($config['test2']));
|
||||
if ($skip) {
|
||||
$this->markTestSkipped('Primary and secondary test databases not configured, skipping cross-database
|
||||
join tests. To run theses tests defined $test and $test2 in your database configuration.'
|
||||
|
@ -2234,9 +2234,9 @@ class ModelIntegrationTest extends BaseModelTest {
|
|||
*/
|
||||
public function testMultischemaFixture() {
|
||||
|
||||
$config = new DATABASE_CONFIG();
|
||||
$config = ConnectionManager::enumConnectionObjects();
|
||||
$this->skipIf($this->db instanceof Sqlite, 'This test is not compatible with Sqlite.');
|
||||
$this->skipIf(!isset($config->test) || !isset($config->test2),
|
||||
$this->skipIf(!isset($config['test']) || !isset($config['test2']),
|
||||
'Primary and secondary test databases not configured, skipping cross-database join tests. To run these tests define $test and $test2 in your database configuration.'
|
||||
);
|
||||
|
||||
|
@ -2264,10 +2264,10 @@ class ModelIntegrationTest extends BaseModelTest {
|
|||
*/
|
||||
public function testMultischemaFixtureWithThreeDatabases() {
|
||||
|
||||
$config = new DATABASE_CONFIG();
|
||||
$config = ConnectionManager::enumConnectionObjects();
|
||||
$this->skipIf($this->db instanceof Sqlite, 'This test is not compatible with Sqlite.');
|
||||
$this->skipIf(
|
||||
!isset($config->test) || !isset($config->test2) || !isset($config->test_database_three),
|
||||
!isset($config['test']) || !isset($config['test2']) || !isset($config['test_database_three']),
|
||||
'Primary, secondary, and tertiary test databases not configured, skipping test. To run this test define $test, $test2, and $test_database_three in your database configuration.'
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue