Skip to content

Commit

Permalink
Moving the plugin import tests to a separate method.
Browse files Browse the repository at this point in the history
Adding tests for importing a pluginAppHelper.
Closes #1111
  • Loading branch information
markstory committed Sep 26, 2010
1 parent 0990728 commit 06ed3a9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
13 changes: 13 additions & 0 deletions cake/tests/cases/libs/configure.test.php
Expand Up @@ -575,7 +575,15 @@ function testClassLoading() {
$this->assertTrue($file);
$this->assertTrue(class_exists('DboSource'));
}
App::build();
}

/**
* test import() with plugins
*
* @return void
*/
function testPluginImporting() {
App::build(array(
'libs' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'libs' . DS),
'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)
Expand All @@ -597,10 +605,15 @@ function testClassLoading() {
$result = App::import('Helper', 'TestPlugin.OtherHelper');
$this->assertTrue($result);
$this->assertTrue(class_exists('OtherHelperHelper'));

$result = App::import('Helper', 'TestPlugin.TestPluginApp');
$this->assertTrue($result);
$this->assertTrue(class_exists('TestPluginAppHelper'));

$result = App::import('Datasource', 'TestPlugin.TestSource');
$this->assertTrue($result);
$this->assertTrue(class_exists('TestSource'));

App::build();
}

Expand Down
@@ -0,0 +1,5 @@
<?php

class TestPluginAppHelper extends AppHelper {

}

0 comments on commit 06ed3a9

Please sign in to comment.