mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
In getMockForModel, place useDbConfig test_xxx
This commit is contained in:
parent
fb5c3ecd71
commit
722a2b3286
1 changed files with 2 additions and 1 deletions
|
@ -866,7 +866,8 @@ abstract class CakeTestCase extends PHPUnit_Framework_TestCase {
|
|||
$availableDs = array_keys(ConnectionManager::enumConnectionObjects());
|
||||
|
||||
if ($mock->useDbConfig !== 'test' && in_array('test_' . $mock->useDbConfig, $availableDs)) {
|
||||
$mock->setDataSource('test_' . $mock->useDbConfig);
|
||||
$mock->useDbConfig = 'test_' . $mock->useDbConfig;
|
||||
$mock->setDataSource($mock->useDbConfig);
|
||||
} else {
|
||||
$mock->useDbConfig = 'test';
|
||||
$mock->setDataSource('test');
|
||||
|
|
Loading…
Reference in a new issue