aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/AppFramework/Http/RequestTest.php
diff options
context:
space:
mode:
authorStanimir Bozhilov <stanimir.bozhilov.1998@gmail.com>2022-12-19 09:07:38 +0100
committerGitHub <noreply@github.com>2022-12-19 09:07:38 +0100
commit7dcd6eb561f4bba7ed36ce1178c725278dd9b80e (patch)
tree8de1664f1a18df2e3b7b3dafadb3e0b6c3a8b439 /tests/lib/AppFramework/Http/RequestTest.php
parented902d58b62150a46c745b5e87c895fc3fc67509 (diff)
parente12aaa298861743f798d9adf644d626ac8e89a95 (diff)
downloadnextcloud-server-7dcd6eb561f4bba7ed36ce1178c725278dd9b80e.tar.gz
nextcloud-server-7dcd6eb561f4bba7ed36ce1178c725278dd9b80e.zip
Merge branch 'master' into add-scim-json-support
Signed-off-by: Stanimir Bozhilov <stanimir.bozhilov.1998@gmail.com>
Diffstat (limited to 'tests/lib/AppFramework/Http/RequestTest.php')
-rw-r--r--tests/lib/AppFramework/Http/RequestTest.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/tests/lib/AppFramework/Http/RequestTest.php b/tests/lib/AppFramework/Http/RequestTest.php
index 16875cfb0d8..78e656f5fc3 100644
--- a/tests/lib/AppFramework/Http/RequestTest.php
+++ b/tests/lib/AppFramework/Http/RequestTest.php
@@ -256,9 +256,20 @@ class RequestTest extends \Test\TestCase {
$this->assertSame('someothertestvalue', $result['propertyB']);
}
- public function testNotJsonPost() {
+ public function notJsonDataProvider() {
+ return [
+ ['this is not valid json'],
+ ['"just a string"'],
+ ['{"just a string"}'],
+ ];
+ }
+
+ /**
+ * @dataProvider notJsonDataProvider
+ */
+ public function testNotJsonPost($testData) {
global $data;
- $data = 'this is not valid json';
+ $data = $testData;
$vars = [
'method' => 'POST',
'server' => ['CONTENT_TYPE' => 'application/json; utf-8']