Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
I
IfAuthEx DokuWiki Plugin
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Security & Compliance
Security & Compliance
Dependency List
Packages
Packages
List
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Progetti
IfAuthEx DokuWiki Plugin
Commits
3fb103b4
Commit
3fb103b4
authored
Jan 10, 2019
by
Pietro Saccardi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Testing expression parsing and rebuilding
parent
1b007b32
Pipeline
#431
passed with stage
in 3 minutes and 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
_test/general.test.php
_test/general.test.php
+14
-0
No files found.
_test/general.test.php
View file @
3fb103b4
<?php
require_once
(
__DIR__
.
'/../syntax/grammar.php'
);
/**
* General tests for the ifauthex plugin
*
...
...
@@ -65,6 +67,18 @@ class general_plugin_ifauthex_test extends DokuWikiTest
'user && user || @group'
);
public
function
test_parse
()
{
foreach
(
self
::
VALID_EXPRESSIONS
as
$expr
)
{
$failureMsg
=
'Assertion failed at expression "'
.
$expr
.
'".'
;
$ast
=
null
;
$rebuiltExpr
=
null
;
$this
->
assertNotNull
(
$ast
=
parse
(
$expr
));
$this
->
assertNotNull
(
$rebuiltExpr
=
$ast
->
getRepresentation
());
$this
->
assertEquals
(
$rebuiltExpr
,
preg_replace
(
'/\s/'
,
''
,
$expr
));
}
}
/**
* Simple test to make sure the plugin.info.txt is in correct format
*/
...
...
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