From 7eed8b73db342c07918df4e7c6d9741380a027b8 Mon Sep 17 00:00:00 2001 From: Andreas Gohr <andi@splitbrain.org> Date: Tue, 29 Aug 2017 21:06:52 +0200 Subject: [PATCH] adjusted the tests --- _test/tests/lib/exe/ajax_requests.test.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/_test/tests/lib/exe/ajax_requests.test.php b/_test/tests/lib/exe/ajax_requests.test.php index 0b63e41fe..e65a7eab5 100644 --- a/_test/tests/lib/exe/ajax_requests.test.php +++ b/_test/tests/lib/exe/ajax_requests.test.php @@ -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\ncaptured event AFTER", $response->getContent()); } -} \ No newline at end of file +} -- GitLab