From b6cdb2a78cb7d182130b92f1d63deec6f0a2e755 Mon Sep 17 00:00:00 2001 From: netkas Date: Wed, 18 Sep 2024 14:07:08 -0400 Subject: [PATCH] Add ResolverTest for parseArguments method --- tests/ncc/Utilities/ResolverTest.php | 61 ++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 tests/ncc/Utilities/ResolverTest.php diff --git a/tests/ncc/Utilities/ResolverTest.php b/tests/ncc/Utilities/ResolverTest.php new file mode 100644 index 0000000..37712a3 --- /dev/null +++ b/tests/ncc/Utilities/ResolverTest.php @@ -0,0 +1,61 @@ + 'bar', + 'baz' => 'bat' + ]; + + $result = Resolver::parseArguments($input); + $this->assertEquals($expected, $result); + } + + /** + * Test parseArguments with array input + */ + public function testParseArgumentsWithArray(): void + { + $input = ['--foo=bar', '--baz=bat']; + $expected = [ + 'foo' => 'bar', + 'baz' => 'bat' + ]; + + $result = Resolver::parseArguments($input); + $this->assertEquals($expected, $result); + } +}