diff options
author | Stanimir Bozhilov <stanimir.bozhilov.1998@gmail.com> | 2022-12-19 09:07:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-19 09:07:38 +0100 |
commit | 7dcd6eb561f4bba7ed36ce1178c725278dd9b80e (patch) | |
tree | 8de1664f1a18df2e3b7b3dafadb3e0b6c3a8b439 /tests/lib/AppFramework/Http/RequestTest.php | |
parent | ed902d58b62150a46c745b5e87c895fc3fc67509 (diff) | |
parent | e12aaa298861743f798d9adf644d626ac8e89a95 (diff) | |
download | nextcloud-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.php | 15 |
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'] |