@@ -318,7 +318,7 @@ public function testWorkflows()
318318 $ this ->assertSame ('state_machine.pull_request.metadata_store ' , (string ) $ metadataStoreReference );
319319
320320 $ 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 ());
322322 $ this ->assertSame (InMemoryMetadataStore::class, $ metadataStoreDefinition ->getClass ());
323323
324324 $ workflowMetadata = $ metadataStoreDefinition ->getArgument (0 );
@@ -1940,21 +1940,27 @@ public function testHttpClientFullDefaultOptions()
19401940 ], $ defaultOptions ['peer_fingerprint ' ]);
19411941 }
19421942
1943- public static function provideMailer (): array
1943+ public static function provideMailer (): iterable
19441944 {
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+ ['redirected@example.org ' ],
1949+ ];
1950+ yield [
1951+ 'mailer_with_transports ' ,
1952+ [
19481953 'transport1 ' => 'smtp://example1.com ' ,
19491954 'transport2 ' => 'smtp://example2.com ' ,
1950- ]],
1955+ ],
1956+ ['redirected@example.org ' , 'redirected1@example.org ' ],
19511957 ];
19521958 }
19531959
19541960 /**
19551961 * @dataProvider provideMailer
19561962 */
1957- public function testMailer (string $ configFile , array $ expectedTransports )
1963+ public function testMailer (string $ configFile , array $ expectedTransports, array $ expectedRecipients )
19581964 {
19591965 $ container = $ this ->createContainerFromFile ($ configFile );
19601966
@@ -1966,7 +1972,7 @@ public function testMailer(string $configFile, array $expectedTransports)
19661972 $ this ->assertTrue ($ container ->hasDefinition ('mailer.envelope_listener ' ));
19671973 $ l = $ container ->getDefinition ('mailer.envelope_listener ' );
19681974 $ this ->assertSame ('sender@example.org ' , $ l ->getArgument (0 ));
1969- $ this ->assertSame ([ ' redirected@example.org ' , ' redirected1@example.org ' ] , $ l ->getArgument (1 ));
1975+ $ this ->assertSame ($ expectedRecipients , $ l ->getArgument (1 ));
19701976 $ this ->assertEquals (new Reference ('messenger.default_bus ' , ContainerInterface::NULL_ON_INVALID_REFERENCE ), $ container ->getDefinition ('mailer.mailer ' )->getArgument (1 ));
19711977
19721978 $ this ->assertTrue ($ container ->hasDefinition ('mailer.message_listener ' ));
0 commit comments