Commit 18a753bf authored by Taddeus Kroes's avatar Taddeus Kroes

Fixed some errors caused by folder/class renaming.

parent 5682c2df
...@@ -164,8 +164,8 @@ class pQuery { ...@@ -164,8 +164,8 @@ class pQuery {
return self::error('Plugin "%s" does not exist.', $class_name); return self::error('Plugin "%s" does not exist.', $class_name);
// Assert that the plugin extend the base clas properly // Assert that the plugin extend the base clas properly
if( !in_array('pQueryExtension', class_implements($class_name)) ) if( !is_subclass_of($class_name, 'pQuery') )
return self::error('Plugin "%s" does not implement pQueryExtension.', $class_name); return self::error('Plugin class "%s" does not extend pQuery.', $class_name);
// Assert that the required PHP version is installed // Assert that the required PHP version is installed
if( isset($class_name::$REQUIRED_PHP_VERSION) if( isset($class_name::$REQUIRED_PHP_VERSION)
......
...@@ -11,7 +11,7 @@ class pQueryTemplateTest extends PHPUnit_Framework_TestCase { ...@@ -11,7 +11,7 @@ class pQueryTemplateTest extends PHPUnit_Framework_TestCase {
function setUp() { function setUp() {
// Set root to tests/templates // Set root to tests/templates
$this->templates_folder = PQUERY_ROOT.'test/'.self::TEMPLATES_FOLDER; $this->templates_folder = PQUERY_ROOT.'tests/'.self::TEMPLATES_FOLDER;
__tpl::set_root($this->templates_folder, false); __tpl::set_root($this->templates_folder, false);
// Load the test template // Load the test template
...@@ -20,14 +20,14 @@ class pQueryTemplateTest extends PHPUnit_Framework_TestCase { ...@@ -20,14 +20,14 @@ class pQueryTemplateTest extends PHPUnit_Framework_TestCase {
} }
function test_add_root_relative() { function test_add_root_relative() {
$folder = PQUERY_ROOT.'test/'; $folder = PQUERY_ROOT.'tests/';
$folder_relative = 'test/'; $folder_relative = 'tests/';
__tpl::add_root($folder_relative); __tpl::add_root($folder_relative);
$this->assertTrue(in_array($folder, __tpl::$include_path), 'folder was not added to include path'); $this->assertTrue(in_array($folder, __tpl::$include_path), 'folder was not added to include path');
} }
function test_add_root_absolute() { function test_add_root_absolute() {
$folder = PQUERY_ROOT.'test/'; $folder = PQUERY_ROOT.'tests/';
__tpl::add_root($folder, false); __tpl::add_root($folder, false);
$this->assertTrue(in_array($folder, __tpl::$include_path), 'folder was not added to include path'); $this->assertTrue(in_array($folder, __tpl::$include_path), 'folder was not added to include path');
} }
...@@ -40,14 +40,14 @@ class pQueryTemplateTest extends PHPUnit_Framework_TestCase { ...@@ -40,14 +40,14 @@ class pQueryTemplateTest extends PHPUnit_Framework_TestCase {
} }
function test_set_root_relative() { function test_set_root_relative() {
$folder = PQUERY_ROOT.'test/'; $folder = PQUERY_ROOT.'tests/';
$folder_relative = 'test/'; $folder_relative = 'tests/';
__tpl::set_root($folder_relative); __tpl::set_root($folder_relative);
$this->assertEquals(array($folder), __tpl::$include_path, 'folder was not set as only include path'); $this->assertEquals(array($folder), __tpl::$include_path, 'folder was not set as only include path');
} }
function test_set_root_absolute() { function test_set_root_absolute() {
$folder = PQUERY_ROOT.'test/'; $folder = PQUERY_ROOT.'tests/';
__tpl::set_root($folder, false); __tpl::set_root($folder, false);
$this->assertEquals(array($folder), __tpl::$include_path, 'folder was not set as only include path'); $this->assertEquals(array($folder), __tpl::$include_path, 'folder was not set as only include path');
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment