@@ -37,7 +37,7 @@ public function getFactory(): TransportFactoryInterface
3737 public static function supportsProvider (): iterable
3838 {
3939 yield [
40- new Dsn ('microsoft+graphapi ' , 'default ' ),
40+ new Dsn ('microsoftgraph+api ' , 'default ' ),
4141 true ,
4242 ];
4343 }
@@ -47,15 +47,15 @@ public static function createProvider(): iterable
4747 $ mockClient = new MockHttpClient ();
4848
4949 yield [
50- new Dsn ('microsoft+graphapi ' , 'default ' , self ::USER , self ::PASSWORD , null , ['tenantId ' => self ::TENANT ]),
50+ new Dsn ('microsoftgraph+api ' , 'default ' , self ::USER , self ::PASSWORD , null , ['tenantId ' => self ::TENANT ]),
5151 new MicrosoftGraphApiTransport ('graph.microsoft.com ' , new TokenManager ('graph.microsoft.com ' , 'login.microsoftonline.com ' , self ::TENANT , self ::USER , self ::PASSWORD , $ mockClient ), false , $ mockClient , null , new NullLogger ()),
5252 ];
5353 yield [
54- new Dsn ('microsoft+graphapi ' , 'other.ms.com ' , self ::USER , self ::PASSWORD , null , ['tenantId ' => self ::TENANT , 'authEndpoint ' => 'auth.ms.com ' ]),
54+ new Dsn ('microsoftgraph+api ' , 'other.ms.com ' , self ::USER , self ::PASSWORD , null , ['tenantId ' => self ::TENANT , 'authEndpoint ' => 'auth.ms.com ' ]),
5555 new MicrosoftGraphApiTransport ('other.ms.com ' , new TokenManager ('other.ms.com ' , 'auth.ms.com ' , self ::TENANT , self ::USER , self ::PASSWORD , $ mockClient ), false , $ mockClient , null , new NullLogger ()),
5656 ];
5757 yield [
58- new Dsn ('microsoft+graphapi ' , 'default ' , self ::USER , self ::PASSWORD , null , ['tenantId ' => self ::TENANT , 'noSave ' => true ]),
58+ new Dsn ('microsoftgraph+api ' , 'default ' , self ::USER , self ::PASSWORD , null , ['tenantId ' => self ::TENANT , 'noSave ' => true ]),
5959 new MicrosoftGraphApiTransport ('graph.microsoft.com ' , new TokenManager ('graph.microsoft.com ' , 'login.microsoftonline.com ' , self ::TENANT , self ::USER , self ::PASSWORD , $ mockClient ), true , $ mockClient , null , new NullLogger ()),
6060 ];
6161 }
@@ -64,24 +64,24 @@ public static function unsupportedSchemeProvider(): iterable
6464 {
6565 yield [
6666 new Dsn ('microsoft+foo ' , 'default ' , self ::USER , self ::PASSWORD ),
67- 'The "microsoft+foo" scheme is not supported; supported schemes for mailer "microsoft graph api" are: "microsoft+graphapi ". ' ,
67+ 'The "microsoft+foo" scheme is not supported; supported schemes for mailer "microsoft graph api" are: "microsoftgraph+api ". ' ,
6868 ];
6969 }
7070
7171 public static function incompleteDsnProvider (): iterable
7272 {
73- yield [new Dsn ('microsoft+graphapi ' , 'default ' )];
74- yield [new Dsn ('microsoft+graphapi ' , 'default ' , self ::USER )];
75- yield [new Dsn ('microsoft+graphapi ' , 'default ' , null , self ::PASSWORD )];
76- yield [new Dsn ('microsoft+graphapi ' , 'default ' , self ::USER , self ::PASSWORD )];
77- yield [new Dsn ('microsoft+graphapi ' , 'non-default ' , self ::USER , self ::PASSWORD , null , ['tenantId ' => self ::TENANT ])];
73+ yield [new Dsn ('microsoftgraph+api ' , 'default ' )];
74+ yield [new Dsn ('microsoftgraph+api ' , 'default ' , self ::USER )];
75+ yield [new Dsn ('microsoftgraph+api ' , 'default ' , null , self ::PASSWORD )];
76+ yield [new Dsn ('microsoftgraph+api ' , 'default ' , self ::USER , self ::PASSWORD )];
77+ yield [new Dsn ('microsoftgraph+api ' , 'non-default ' , self ::USER , self ::PASSWORD , null , ['tenantId ' => self ::TENANT ])];
7878 }
7979
8080 #[DataProvider('invalidHttpDsnProvider ' )]
8181 public function testValidatesHttpNotProvided (string $ graph , string $ auth , string $ failingType )
8282 {
8383 $ factory = $ this ->getFactory ();
84- $ dsn = new Dsn ('microsoft+graphapi ' , $ graph , self ::USER , self ::PASSWORD , null , ['tenantId ' => self ::TENANT , 'authEndpoint ' => $ auth ]);
84+ $ dsn = new Dsn ('microsoftgraph+api ' , $ graph , self ::USER , self ::PASSWORD , null , ['tenantId ' => self ::TENANT , 'authEndpoint ' => $ auth ]);
8585
8686 $ this ->expectException (InvalidArgumentException::class);
8787 $ this ->expectExceptionMessage ($ failingType .' endpoint needs to be provided without http(s)://. ' );
0 commit comments