@@ -361,7 +361,7 @@ public function testWorkflows()
361
361
$ this ->assertSame ('state_machine.pull_request.metadata_store ' , (string ) $ metadataStoreReference );
362
362
363
363
$ metadataStoreDefinition = $ container ->getDefinition ('state_machine.pull_request.metadata_store ' );
364
- $ this ->assertSame (Workflow \ Metadata \ InMemoryMetadataStore::class, $ metadataStoreDefinition ->getClass ());
364
+ $ this ->assertSame (InMemoryMetadataStore::class, $ metadataStoreDefinition ->getClass ());
365
365
$ this ->assertSame (InMemoryMetadataStore::class, $ metadataStoreDefinition ->getClass ());
366
366
367
367
$ workflowMetadata = $ metadataStoreDefinition ->getArgument (0 );
@@ -2056,21 +2056,27 @@ public function testHttpClientFullDefaultOptions()
2056
2056
$ this ->assertSame (['foo ' => ['bar ' => 'baz ' ]], $ defaultOptions ['extra ' ]);
2057
2057
}
2058
2058
2059
- public static function provideMailer (): array
2059
+ public static function provideMailer (): iterable
2060
2060
{
2061
- return [
2062
- ['mailer_with_dsn ' , ['main ' => 'smtp://example.com ' ]],
2063
- ['mailer_with_transports ' , [
2061
+ yield [
2062
+ 'mailer_with_dsn ' ,
2063
+ ['main ' => 'smtp://example.com ' ],
2064
+
2065
+ ];
2066
+ yield [
2067
+ 'mailer_with_transports ' ,
2068
+ [
2064
2069
'transport1 ' => 'smtp://example1.com ' ,
2065
2070
'transport2 ' => 'smtp://example2.com ' ,
2066
- ]],
2071
+ ],
2072
+
2067
2073
];
2068
2074
}
2069
2075
2070
2076
/**
2071
2077
* @dataProvider provideMailer
2072
2078
*/
2073
- public function testMailer (string $ configFile , array $ expectedTransports )
2079
+ public function testMailer (string $ configFile , array $ expectedTransports, array $ expectedRecipients )
2074
2080
{
2075
2081
$ container = $ this ->createContainerFromFile ($ configFile );
2076
2082
@@ -2082,7 +2088,7 @@ public function testMailer(string $configFile, array $expectedTransports)
2082
2088
$ this ->assertTrue ($ container ->hasDefinition ('mailer.envelope_listener ' ));
2083
2089
$ l = $ container ->getDefinition ('mailer.envelope_listener ' );
2084
2090
$ this ->
assertSame (
'[email protected] ' ,
$ l->
getArgument (
0 ));
2085
- $ this ->
assertSame (
[ ' [email protected] ' , ' [email protected] ' ] ,
$ l->
getArgument (
1 ));
2091
+ $ this ->assertSame ($ expectedRecipients , $ l ->getArgument (1 ));
2086
2092
$ this ->assertEquals (new Reference ('messenger.default_bus ' , ContainerInterface::NULL_ON_INVALID_REFERENCE ), $ container ->getDefinition ('mailer.mailer ' )->getArgument (1 ));
2087
2093
2088
2094
$ this ->assertTrue ($ container ->hasDefinition ('mailer.message_listener ' ));
0 commit comments