|
|
@@ -409,21 +409,26 @@ class AppImportTest extends UnitTestCase {
|
|
|
|
|
|
$file = App::import('Model', 'Model', false);
|
|
|
$this->assertTrue($file);
|
|
|
+ $this->assertTrue(class_exists('Model'));
|
|
|
|
|
|
$file = App::import('Controller', 'Controller', false);
|
|
|
$this->assertTrue($file);
|
|
|
+ $this->assertTrue(class_exists('Controller'));
|
|
|
|
|
|
$file = App::import('Component', 'Component', false);
|
|
|
$this->assertTrue($file);
|
|
|
+ $this->assertTrue(class_exists('Component'));
|
|
|
|
|
|
$file = App::import('Shell', 'Shell', false);
|
|
|
$this->assertTrue($file);
|
|
|
+ $this->assertTrue(class_exists('Shell'));
|
|
|
|
|
|
$file = App::import('Model', 'SomeRandomModelThatDoesNotExist', false);
|
|
|
$this->assertFalse($file);
|
|
|
|
|
|
$file = App::import('Model', 'AppModel', false);
|
|
|
$this->assertTrue($file);
|
|
|
+ $this->assertTrue(class_exists('AppModel'));
|
|
|
|
|
|
$file = App::import('WrongType', null, true, array(), '');
|
|
|
$this->assertTrue($file);
|
|
|
@@ -456,6 +461,7 @@ class AppImportTest extends UnitTestCase {
|
|
|
|
|
|
$file = App::import('Controller', 'Pages');
|
|
|
$this->assertTrue($file);
|
|
|
+ $this->assertTrue(class_exists('PagesController'));
|
|
|
|
|
|
$classes = array_flip(get_declared_classes());
|
|
|
|
|
|
@@ -469,12 +475,15 @@ class AppImportTest extends UnitTestCase {
|
|
|
|
|
|
$file = App::import('Behavior', 'Containable');
|
|
|
$this->assertTrue($file);
|
|
|
+ $this->assertTrue(class_exists('ContainableBehavior'));
|
|
|
|
|
|
$file = App::import('Component', 'RequestHandler');
|
|
|
$this->assertTrue($file);
|
|
|
+ $this->assertTrue(class_exists('RequestHandlerComponent'));
|
|
|
|
|
|
$file = App::import('Helper', 'Form');
|
|
|
$this->assertTrue($file);
|
|
|
+ $this->assertTrue(class_exists('FormHelper'));
|
|
|
|
|
|
$file = App::import('Model', 'NonExistingModel');
|
|
|
$this->assertFalse($file);
|