@@ -22,7 +22,8 @@ public function testCreateFromString(
2222 int $ expectedPort ,
2323 string $ expectedPublicKey ,
2424 string $ expectedProjectId ,
25- string $ expectedPath
25+ string $ expectedPath ,
26+ ?int $ expectedOrgId
2627 ): void {
2728 $ dsn = Dsn::createFromString ($ value );
2829
@@ -32,6 +33,7 @@ public function testCreateFromString(
3233 $ this ->assertSame ($ expectedPublicKey , $ dsn ->getPublicKey ());
3334 $ this ->assertSame ($ expectedProjectId , $ dsn ->getProjectId (true ));
3435 $ this ->assertSame ($ expectedPath , $ dsn ->getPath ());
36+ $ this ->assertSame ($ expectedOrgId , $ dsn ->getOrgId ());
3537 }
3638
3739 public static function createFromStringDataProvider (): \Generator
@@ -44,6 +46,7 @@ public static function createFromStringDataProvider(): \Generator
4446 'public ' ,
4547 '1 ' ,
4648 '/sentry ' ,
49+ null ,
4750 ];
4851
4952 yield [
@@ -54,6 +57,18 @@ public static function createFromStringDataProvider(): \Generator
5457 'public ' ,
5558 '1 ' ,
5659 '' ,
60+ null ,
61+ ];
62+
63+ yield [
64+ 'http://public@o1.example.com/1 ' ,
65+ 'http ' ,
66+ 'o1.example.com ' ,
67+ 80 ,
68+ 'public ' ,
69+ '1 ' ,
70+ '' ,
71+ 1 ,
5772 ];
5873
5974 yield [
@@ -64,6 +79,7 @@ public static function createFromStringDataProvider(): \Generator
6479 'public ' ,
6580 '1 ' ,
6681 '' ,
82+ null ,
6783 ];
6884
6985 yield [
@@ -74,6 +90,7 @@ public static function createFromStringDataProvider(): \Generator
7490 'public ' ,
7591 '1 ' ,
7692 '' ,
93+ null ,
7794 ];
7895
7996 yield [
@@ -84,6 +101,7 @@ public static function createFromStringDataProvider(): \Generator
84101 'public ' ,
85102 '1 ' ,
86103 '' ,
104+ null ,
87105 ];
88106
89107 yield [
@@ -94,6 +112,7 @@ public static function createFromStringDataProvider(): \Generator
94112 'public ' ,
95113 '1 ' ,
96114 '' ,
115+ null ,
97116 ];
98117
99118 yield [
@@ -104,6 +123,7 @@ public static function createFromStringDataProvider(): \Generator
104123 'public ' ,
105124 '1 ' ,
106125 '' ,
126+ null ,
107127 ];
108128
109129 yield [
@@ -114,6 +134,7 @@ public static function createFromStringDataProvider(): \Generator
114134 'public ' ,
115135 '1 ' ,
116136 '' ,
137+ null ,
117138 ];
118139 }
119140
@@ -240,6 +261,7 @@ public static function toStringDataProvider(): array
240261 return [
241262 ['http://public@example.com/sentry/1 ' ],
242263 ['http://public@example.com/1 ' ],
264+ ['http://public@o1.example.com/1 ' ],
243265 ['http://public@example.com:8080/sentry/1 ' ],
244266 ['https://public@example.com/sentry/1 ' ],
245267 ['https://public@example.com:4343/sentry/1 ' ],
0 commit comments