File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ public static function sanitize(string $uri, array $uriMask = []): string
2727 '/\/(?<=\/)[0-9A-F]{16,24}(?=\/)?/i ' ,
2828 '/\/(?<=\/)\d+(?=\/)?/ ' ,
2929 '/\/(?<=\/)R[RN]\d{16}[A-Za-z0-9]{11}/ ' ,
30+ '/\/(?<=\/)BILL-([A-F0-9]{8}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{4}-[A-F0-9]{12})(?=\/)?/i ' ,
3031 ],
3132 ),
3233 array_merge (
@@ -39,9 +40,10 @@ public static function sanitize(string $uri, array $uriMask = []): string
3940 '/<OID> ' ,
4041 '/<NUMBER> ' ,
4142 '/<EXTERNAL-ID> ' ,
43+ '/<BILL-UUID> ' ,
4244 ],
4345 ),
4446 '/ ' . ltrim ($ uri , '/ ' ),
4547 );
4648 }
47- }
49+ }
Original file line number Diff line number Diff line change @@ -161,4 +161,18 @@ public function testClearUriExternalIds(): void
161161 self ::assertSame ('/v7/test/<EXTERNAL-ID>/<EXTERNAL-ID>/<EXTERNAL-ID>/ ' , Uri::sanitize ('/v7/test/RR2101818220123720H9KJTERfw1a/RN2001818220123720H9KJTERBd52/RR2123818220123730H9KJTERBd52/ ' ));
162162 self ::assertSame ('/v9/test/<EXTERNAL-ID>/bar/<NUMBER> ' , Uri::sanitize ('/v9/test/RR2101818220123720H9KJTERfw1a/bar/12345 ' ));
163163 }
164+
165+ public function testClearUriBillUuid (): void
166+ {
167+ $ billUuid = 'BILL-123e4567-e89b-12d3-a456-426614174000 ' ;
168+
169+ self ::assertSame ('/v1/test ' , Uri::sanitize ('/v1/test ' ));
170+ self ::assertSame ('/v2/test/<BILL-UUID> ' , Uri::sanitize ("/v2/test/ {$ billUuid }" ));
171+ self ::assertSame ('/v3/test/<BILL-UUID>/bar ' , Uri::sanitize ("/v3/test/ {$ billUuid }/bar " ));
172+ self ::assertSame ('/v4/test/<BILL-UUID>/bar/<BILL-UUID>/ ' , Uri::sanitize ("/v4/test/ {$ billUuid }/bar/ {$ billUuid }/ " ));
173+ self ::assertSame ('/v5/test/<BILL-UUID>/<BILL-UUID> ' , Uri::sanitize ("/v5/test/ {$ billUuid }/ {$ billUuid }" ));
174+ self ::assertSame ('/v6/test/<BILL-UUID>/<BILL-UUID>/ ' , Uri::sanitize ("/v6/test/ {$ billUuid }/ {$ billUuid }/ " ));
175+ self ::assertSame ('/v7/test/<BILL-UUID>/<BILL-UUID>/<BILL-UUID> ' , Uri::sanitize ("/v7/test/ {$ billUuid }/ {$ billUuid }/ {$ billUuid }" ));
176+ self ::assertSame ('/v8/test/<BILL-UUID>/<BILL-UUID>/<BILL-UUID>/ ' , Uri::sanitize ("/v8/test/ {$ billUuid }/ {$ billUuid }/ {$ billUuid }/ " ));
177+ }
164178}
You can’t perform that action at this time.
0 commit comments