+ 'expected' => 'Artists4Future_Muenchen@climatejustice.global',
+ 'uri' => '@Artists4Future_Muenchen@climatejustice.global',
+ ],
+ 'no-scheme-no-fragment' => [
+ 'expected' => 'example.com/path?arg=value',
+ 'uri' => 'example.com/path?arg=value',
+ ],
+ /* This case makes little sense, both in our expectation of receiving it in any context and in the way we
+ * do not change it in Probe::cleanUri, but it doesn't seem to be the source of any terrible security hole.
+ */
+ 'no-scheme-fragment' => [
+ 'expected' => 'example.com/path?arg=value#fragment',
+ 'uri' => 'example.com/path?arg=value#fragment',
+ ],
+ 'scheme-no-fragment' => [
+ 'expected' => 'https://example.com/path?arg=value',
+ 'uri' => 'https://example.com/path?arg=value#fragment',
+ ],
+ 'scheme-fragment' => [
+ 'expected' => 'https://example.com/path?arg=value',
+ 'uri' => 'https://example.com/path?arg=value#fragment',
+ ],
+ ];
+ }
+
+ /**
+ * @dataProvider dataCleanUri
+ */
+ public function testCleanUri(string $expected, string $uri)
+ {
+ self::assertEquals($expected, Probe::cleanURI($uri));
+ }
+
+ public function dataUri(): array
+ {
+ return [
+ 'Artists4Future_Muenchen@climatejustice.global' => [
+ 'uri' => 'Artists4Future_Muenchen@climatejustice.global',