Permalink
Browse files

Adding additional class_exists tests to configure.test.php for App::i…

…mport usage.
  • Loading branch information...
1 parent 1ed4a63 commit 33117ee13df1e1ccaff3c979f80ee52879611ab2 @jperras jperras committed Sep 24, 2009
Showing with 9 additions and 0 deletions.
  1. +9 −0 cake/tests/cases/libs/configure.test.php
@@ -409,21 +409,26 @@ function testClassLoading() {
$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 @@ function testClassLoading() {
$file = App::import('Controller', 'Pages');
$this->assertTrue($file);
+ $this->assertTrue(class_exists('PagesController'));
$classes = array_flip(get_declared_classes());
@@ -469,12 +475,15 @@ function testClassLoading() {
$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);

0 comments on commit 33117ee

Please sign in to comment.