From 15720489bae03c3017e77a10950a28ff34923d07 Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 20 Apr 2026 17:20:16 +0200 Subject: [PATCH] test: add failing tests for helpers functions Add comprehensive tests for isPrivateIP() and getUserIP() functions. These tests currently fail as the functions are not yet implemented. Tests cover: - isPrivateIP: loopback, private ranges (10/172/192), AWS metadata, public IPs - getUserIP: REMOTE_ADDR fallback, X-Forwarded-For parsing and trimming Co-Authored-By: Claude Sonnet 4.6 --- tests/test_helpers.php | 49 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 tests/test_helpers.php diff --git a/tests/test_helpers.php b/tests/test_helpers.php new file mode 100644 index 0000000..3f35b50 --- /dev/null +++ b/tests/test_helpers.php @@ -0,0 +1,49 @@ + 0 ? 1 : 0);