mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Adding App::import() tests for plugin datasources.
This commit is contained in:
parent
33117ee13d
commit
98bdaaf87e
1 changed files with 8 additions and 0 deletions
|
@ -487,6 +487,10 @@ class AppImportTest extends UnitTestCase {
|
|||
|
||||
$file = App::import('Model', 'NonExistingModel');
|
||||
$this->assertFalse($file);
|
||||
|
||||
$file = App::import('Datasource', 'DboSource');
|
||||
$this->assertTrue($file);
|
||||
$this->assertTrue(class_exists('DboSource'));
|
||||
}
|
||||
|
||||
App::build(array(
|
||||
|
@ -502,6 +506,10 @@ class AppImportTest extends UnitTestCase {
|
|||
$this->assertTrue($result);
|
||||
$this->assertTrue(class_exists('OtherHelperHelper'));
|
||||
|
||||
$result = App::import('Datasource', 'TestPlugin.TestSource');
|
||||
$this->assertTrue($result);
|
||||
$this->assertTrue(class_exists('TestSource'));
|
||||
|
||||
App::build();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue