summaryrefslogtreecommitdiff
path: root/tests/Unit
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-11-20 16:02:03 +0100
committermsquare <msquare@notrademark.de>2018-11-21 19:24:36 +0100
commit944c29b96429ec95ac1371cb33cc43704a60c7b1 (patch)
tree7be99e68d8c15fc7e210a4b3ccc44861a8d1de64 /tests/Unit
parentfd37c9d60ea818dc9a562fa88ff5f9a50132506f (diff)
Require POST for sending forms
* Ensure that the form is submitted with a post request * Replaced several links with forms Closes #494 (Security Vulnerability)
Diffstat (limited to 'tests/Unit')
-rw-r--r--tests/Unit/Http/RequestTest.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/Unit/Http/RequestTest.php b/tests/Unit/Http/RequestTest.php
index 916aac35..11a8ed83 100644
--- a/tests/Unit/Http/RequestTest.php
+++ b/tests/Unit/Http/RequestTest.php
@@ -67,6 +67,24 @@ class RequestTest extends TestCase
}
/**
+ * @covers \Engelsystem\Http\Request::hasPostData
+ */
+ public function testHasPostData()
+ {
+ $request = new Request([
+ 'foo' => 'bar',
+ ], [
+ 'lorem' => 'ipsum',
+ ]);
+
+ $this->assertTrue($request->has('foo'));
+ $this->assertFalse($request->hasPostData('foo'));
+
+ $this->assertTrue($request->has('lorem'));
+ $this->assertTrue($request->hasPostData('lorem'));
+ }
+
+ /**
* @covers \Engelsystem\Http\Request::path
*/
public function testPath()