Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pquery
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
pquery
Commits
18a753bf
Commit
18a753bf
authored
Dec 10, 2011
by
Taddeus Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed some errors caused by folder/class renaming.
parent
5682c2df
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
pquery.php
pquery.php
+2
-2
tests/template.php
tests/template.php
+7
-7
No files found.
pquery.php
View file @
18a753bf
...
...
@@ -164,8 +164,8 @@ class pQuery {
return
self
::
error
(
'Plugin "%s" does not exist.'
,
$class_name
);
// Assert that the plugin extend the base clas properly
if
(
!
i
n_array
(
'pQueryExtension'
,
class_implements
(
$class_name
)
)
)
return
self
::
error
(
'Plugin
"%s" does not implement pQueryExtension
.'
,
$class_name
);
if
(
!
i
s_subclass_of
(
$class_name
,
'pQuery'
)
)
return
self
::
error
(
'Plugin
class "%s" does not extend pQuery
.'
,
$class_name
);
// Assert that the required PHP version is installed
if
(
isset
(
$class_name
::
$REQUIRED_PHP_VERSION
)
...
...
tests/template.php
View file @
18a753bf
...
...
@@ -11,7 +11,7 @@ class pQueryTemplateTest extends PHPUnit_Framework_TestCase {
function
setUp
()
{
// Set root to tests/templates
$this
->
templates_folder
=
PQUERY_ROOT
.
'test/'
.
self
::
TEMPLATES_FOLDER
;
$this
->
templates_folder
=
PQUERY_ROOT
.
'test
s
/'
.
self
::
TEMPLATES_FOLDER
;
__tpl
::
set_root
(
$this
->
templates_folder
,
false
);
// Load the test template
...
...
@@ -20,14 +20,14 @@ class pQueryTemplateTest extends PHPUnit_Framework_TestCase {
}
function
test_add_root_relative
()
{
$folder
=
PQUERY_ROOT
.
'test/'
;
$folder_relative
=
'test/'
;
$folder
=
PQUERY_ROOT
.
'test
s
/'
;
$folder_relative
=
'test
s
/'
;
__tpl
::
add_root
(
$folder_relative
);
$this
->
assertTrue
(
in_array
(
$folder
,
__tpl
::
$include_path
),
'folder was not added to include path'
);
}
function
test_add_root_absolute
()
{
$folder
=
PQUERY_ROOT
.
'test/'
;
$folder
=
PQUERY_ROOT
.
'test
s
/'
;
__tpl
::
add_root
(
$folder
,
false
);
$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 {
}
function
test_set_root_relative
()
{
$folder
=
PQUERY_ROOT
.
'test/'
;
$folder_relative
=
'test/'
;
$folder
=
PQUERY_ROOT
.
'test
s
/'
;
$folder_relative
=
'test
s
/'
;
__tpl
::
set_root
(
$folder_relative
);
$this
->
assertEquals
(
array
(
$folder
),
__tpl
::
$include_path
,
'folder was not set as only include path'
);
}
function
test_set_root_absolute
()
{
$folder
=
PQUERY_ROOT
.
'test/'
;
$folder
=
PQUERY_ROOT
.
'test
s
/'
;
__tpl
::
set_root
(
$folder
,
false
);
$this
->
assertEquals
(
array
(
$folder
),
__tpl
::
$include_path
,
'folder was not set as only include path'
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment