@@ -28,11 +28,11 @@ final class FixUrlProtocolListenerTest extends TestCase
2828 /**
2929 * @dataProvider provideUrlCases
3030 *
31- * @param array< string, string> |null $inputData
32- * @param array< string, string> |null $expectedData
31+ * @param string|null $inputData
32+ * @param string|null $expectedData
3333 * @param string $defaultProtocol
3434 */
35- public function testUrlProtocolHandling (?array $ inputData , ?array $ expectedData , ?string $ defaultProtocol = 'http ' ): void
35+ public function testUrlProtocolHandling (?string $ inputData , ?string $ expectedData , ?string $ defaultProtocol = 'http ' ): void
3636 {
3737 $ form = $ this ->createMock (FormInterface::class);
3838 $ listener = new FixUrlProtocolListener ($ defaultProtocol );
@@ -46,58 +46,54 @@ public function testUrlProtocolHandling(?array $inputData, ?array $expectedData,
4646
4747 /**
4848 * @return iterable<string, array{
49- * 0: array< string, string> |null,
50- * 1: array< string, string> |null
49+ * 0: string|null,
50+ * 1: string|null
5151 * }>
5252 */
5353 public static function provideUrlCases (): iterable
5454 {
5555 return [
5656 'adds http when protocol missing ' => [
57- [ ' link ' => self ::DOMAIN ] ,
58- [ ' link ' => self ::URL_HTTP ] ,
57+ self ::DOMAIN ,
58+ self ::URL_HTTP ,
5959 ],
6060 'does not modify https url ' => [
61- [ ' link ' => self ::URL_HTTPS ] ,
62- [ ' link ' => self ::URL_HTTPS ] ,
61+ self ::URL_HTTPS ,
62+ self ::URL_HTTPS ,
6363 ],
6464 'does not modify http url ' => [
65- [ ' link ' => self ::URL_HTTP ] ,
66- [ ' link ' => self ::URL_HTTP ] ,
65+ self ::URL_HTTP ,
66+ self ::URL_HTTP ,
6767 ],
6868 'keep relative url with leading / intact ' => [
69- [ ' link ' => self ::URL_RELATIVE ] ,
70- [ ' link ' => self ::URL_RELATIVE ] ,
69+ self ::URL_RELATIVE ,
70+ self ::URL_RELATIVE ,
7171 ],
7272 'keeps ftp intact ' => [
73- [ ' link ' => self ::URL_SFTP ] ,
74- [ ' link ' => self ::URL_SFTP ] ,
73+ self ::URL_SFTP ,
74+ self ::URL_SFTP ,
7575 ],
7676 'keeps tel intact ' => [
77- [ ' link ' => self ::URL_TEL ] ,
78- [ ' link ' => self ::URL_TEL ] ,
77+ self ::URL_TEL ,
78+ self ::URL_TEL ,
7979 ],
8080 'adds default tel ' => [
81- [ ' link ' => self ::TEL ] ,
82- [ ' link ' => self ::URL_TEL ] ,
81+ self ::TEL ,
82+ self ::URL_TEL ,
8383 'tel ' ,
8484 ],
8585 'keeps mailto intact ' => [
86- [ ' link ' => self ::URL_MAILTO ] ,
87- [ ' link ' => self ::URL_MAILTO ] ,
86+ self ::URL_MAILTO ,
87+ self ::URL_MAILTO ,
8888 ],
8989 'adds default mailto ' => [
90- [ ' link ' => self ::MAIL ] ,
91- [ ' link ' => self ::URL_MAILTO ] ,
90+ self ::MAIL ,
91+ self ::URL_MAILTO ,
9292 'mailto ' ,
9393 ],
9494 'does nothing when link is empty string ' => [
95- ['link ' => '' ],
96- ['link ' => '' ],
97- ],
98- 'does nothing when link key is missing ' => [
99- [],
100- [],
95+ '' ,
96+ '' ,
10197 ],
10298 'does nothing when data is null ' => [
10399 null ,
0 commit comments