Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dokuwiki
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
BRIC
dokuwiki
Commits
7eed8b73
Commit
7eed8b73
authored
7 years ago
by
Andreas Gohr
Browse files
Options
Downloads
Patches
Plain Diff
adjusted the tests
parent
16a367d4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
_test/tests/lib/exe/ajax_requests.test.php
+9
-5
9 additions, 5 deletions
_test/tests/lib/exe/ajax_requests.test.php
with
9 additions
and
5 deletions
_test/tests/lib/exe/ajax_requests.test.php
+
9
−
5
View file @
7eed8b73
...
...
@@ -5,6 +5,11 @@
*/
class
ajax_requests_test
extends
DokuWikiTest
{
/**
* DataProvider for the builtin Ajax calls
*
* @return array
*/
public
function
defaultCalls
()
{
return
[
// TODO: better logic and DOM walks
...
...
@@ -23,9 +28,11 @@ class ajax_requests_test extends DokuWikiTest {
];
}
/**
* @dataProvider defaultCalls
* @param string $call
* @param array $post
* @param string $regexp
*/
public
function
test_defaultCallsExist
(
$call
,
$post
,
$regexp
)
{
...
...
@@ -36,8 +43,6 @@ class ajax_requests_test extends DokuWikiTest {
if
(
!
empty
(
$regexp
))
{
$this
->
assertRegExp
(
$regexp
,
$response
->
getContent
());
}
$this
->
assertTrue
(
function_exists
(
'ajax_'
.
$call
));
}
public
function
test_CallNotProvided
()
{
...
...
@@ -51,7 +56,6 @@ class ajax_requests_test extends DokuWikiTest {
$request
=
new
TestRequest
();
$response
=
$request
->
post
([
'call'
=>
$call
],
'/lib/exe/ajax.php'
);
$this
->
assertEquals
(
"AJAX call '
$call
' unknown!
\n
"
,
$response
->
getContent
());
$this
->
assertFalse
(
function_exists
(
'ajax_'
.
$call
));
}
...
...
@@ -116,4 +120,4 @@ class ajax_requests_test extends DokuWikiTest {
$this
->
assertEquals
(
"captured event BEFORE
\n
captured event AFTER"
,
$response
->
getContent
());
}
}
\ No newline at end of file
}
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