Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pquery
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Taddeüs Kroes
pquery
Commits
18a753bf
Commit
18a753bf
authored
13 years ago
by
Taddeus Kroes
Browse files
Options
Downloads
Patches
Plain Diff
Fixed some errors caused by folder/class renaming.
parent
5682c2df
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pquery.php
+2
-2
2 additions, 2 deletions
pquery.php
tests/template.php
+7
-7
7 additions, 7 deletions
tests/template.php
with
9 additions
and
9 deletions
pquery.php
+
2
−
2
View file @
18a753bf
...
@@ -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
(
!
i
n_array
(
'pQueryExtension'
,
class_implements
(
$class_name
)
)
)
if
(
!
i
s_subclass_of
(
$class_name
,
'pQuery'
)
)
return
self
::
error
(
'Plugin "%s" does not
implem
en
t
pQuery
Extension
.'
,
$class_name
);
return
self
::
error
(
'Plugin
class
"%s" does not
ext
en
d
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
)
...
...
This diff is collapsed.
Click to expand it.
tests/template.php
+
7
−
7
View file @
18a753bf
...
@@ -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
.
'test
s
/'
.
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
.
'test
s
/'
;
$folder_relative
=
'test/'
;
$folder_relative
=
'test
s
/'
;
__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
.
'test
s
/'
;
__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
.
'test
s
/'
;
$folder_relative
=
'test/'
;
$folder_relative
=
'test
s
/'
;
__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
.
'test
s
/'
;
__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'
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment