mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
fix failing tests. test and mocked sources would cause exceptions
This commit is contained in:
parent
dde0912d1e
commit
8374eb92cc
4 changed files with 9 additions and 1 deletions
|
@ -78,7 +78,6 @@ class ConnectionManager {
|
|||
*
|
||||
* @param string $name The name of the DataSource, as defined in app/Config/database.php
|
||||
* @return DataSource Instance
|
||||
* @throws MissingDatasourceConfigException
|
||||
* @throws MissingDatasourceException
|
||||
*/
|
||||
public static function getDataSource($name) {
|
||||
|
|
|
@ -21,6 +21,9 @@ App::uses('Model', 'Model');
|
|||
App::uses('AppModel', 'Model');
|
||||
App::uses('DataSource', 'Model/Datasource');
|
||||
App::uses('DboSource', 'Model/Datasource');
|
||||
App::uses('DboTestSource', 'Model/Datasource');
|
||||
App::uses('DboSecondTestSource', 'Model/Datasource');
|
||||
App::uses('MockDataSource', 'Model/Datasource');
|
||||
require_once dirname(dirname(__FILE__)) . DS . 'models.php';
|
||||
|
||||
class MockPDO extends PDO {
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
require_once dirname(__FILE__) . DS . 'ModelTestBase.php';
|
||||
App::uses('DboSource', 'Model/Datasource');
|
||||
App::uses('DboMock', 'Model/Datasource');
|
||||
|
||||
/**
|
||||
* DboMock class
|
||||
|
|
|
@ -17,6 +17,11 @@
|
|||
* @since CakePHP(tm) v 1.2.0.4206
|
||||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
|
||||
*/
|
||||
App::uses('MockTransactionDboSource', 'Model/Datasource');
|
||||
App::uses('MockTransactionAssociatedDboSource', 'Model/Datasource');
|
||||
App::uses('MockManyTransactionDboSource', 'Model/Datasource');
|
||||
App::uses('MockAssociatedTransactionDboSource', 'Model/Datasource');
|
||||
|
||||
require_once dirname(__FILE__) . DS . 'ModelTestBase.php';
|
||||
/**
|
||||
* ModelWriteTest
|
||||
|
|
Loading…
Add table
Reference in a new issue