From 0488a4582b4830876fb8fd675618bb68bfb87cd2 Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Mon, 19 Aug 2024 14:56:43 +0900 Subject: [PATCH] Add tests --- .../unit/Utopia/Response/Filters/V18Test.php | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/unit/Utopia/Response/Filters/V18Test.php b/tests/unit/Utopia/Response/Filters/V18Test.php index 5396779b77..ec4ffb68fc 100644 --- a/tests/unit/Utopia/Response/Filters/V18Test.php +++ b/tests/unit/Utopia/Response/Filters/V18Test.php @@ -147,4 +147,29 @@ class V18Test extends TestCase $this->assertEquals($expected, $result); } + + public function runtimeProvider(): array + { + return [ + 'remove key' => [ + [ + 'key' => 'example_key', + ], + [ + ] + ] + ]; + } + + /** + * @dataProvider runtimeProvider + */ + public function testRuntime(array $content, array $expected): void + { + $model = Response::MODEL_RUNTIME; + + $result = $this->filter->parse($content, $model); + + $this->assertEquals($expected, $result); + } }