@@ -318,7 +318,7 @@ public function testWorkflows()
318
318
$ this ->assertSame ('state_machine.pull_request.metadata_store ' , (string ) $ metadataStoreReference );
319
319
320
320
$ metadataStoreDefinition = $ container ->getDefinition ('state_machine.pull_request.metadata_store ' );
321
- $ this ->assertSame (Workflow \ Metadata \ InMemoryMetadataStore::class, $ metadataStoreDefinition ->getClass ());
321
+ $ this ->assertSame (InMemoryMetadataStore::class, $ metadataStoreDefinition ->getClass ());
322
322
$ this ->assertSame (InMemoryMetadataStore::class, $ metadataStoreDefinition ->getClass ());
323
323
324
324
$ workflowMetadata = $ metadataStoreDefinition ->getArgument (0 );
@@ -1940,21 +1940,27 @@ public function testHttpClientFullDefaultOptions()
1940
1940
], $ defaultOptions ['peer_fingerprint ' ]);
1941
1941
}
1942
1942
1943
- public static function provideMailer (): array
1943
+ public static function provideMailer (): iterable
1944
1944
{
1945
- return [
1946
- ['mailer_with_dsn ' , ['main ' => 'smtp://example.com ' ]],
1947
- ['mailer_with_transports ' , [
1945
+ yield [
1946
+ 'mailer_with_dsn ' ,
1947
+ ['main ' => 'smtp://example.com ' ],
1948
+
1949
+ ];
1950
+ yield [
1951
+ 'mailer_with_transports ' ,
1952
+ [
1948
1953
'transport1 ' => 'smtp://example1.com ' ,
1949
1954
'transport2 ' => 'smtp://example2.com ' ,
1950
- ]],
1955
+ ],
1956
+
1951
1957
];
1952
1958
}
1953
1959
1954
1960
/**
1955
1961
* @dataProvider provideMailer
1956
1962
*/
1957
- public function testMailer (string $ configFile , array $ expectedTransports )
1963
+ public function testMailer (string $ configFile , array $ expectedTransports, array $ expectedRecipients )
1958
1964
{
1959
1965
$ container = $ this ->createContainerFromFile ($ configFile );
1960
1966
@@ -1966,7 +1972,7 @@ public function testMailer(string $configFile, array $expectedTransports)
1966
1972
$ this ->assertTrue ($ container ->hasDefinition ('mailer.envelope_listener ' ));
1967
1973
$ l = $ container ->getDefinition ('mailer.envelope_listener ' );
1968
1974
$ this ->
assertSame (
'[email protected] ' ,
$ l->
getArgument (
0 ));
1969
- $ this ->
assertSame (
[ ' [email protected] ' , ' [email protected] ' ] ,
$ l->
getArgument (
1 ));
1975
+ $ this ->assertSame ($ expectedRecipients , $ l ->getArgument (1 ));
1970
1976
$ this ->assertEquals (new Reference ('messenger.default_bus ' , ContainerInterface::NULL_ON_INVALID_REFERENCE ), $ container ->getDefinition ('mailer.mailer ' )->getArgument (1 ));
1971
1977
1972
1978
$ this ->assertTrue ($ container ->hasDefinition ('mailer.message_listener ' ));
0 commit comments