@@ -361,7 +361,7 @@ public function testWorkflows()
361361 $ this ->assertSame ('state_machine.pull_request.metadata_store ' , (string ) $ metadataStoreReference );
362362
363363 $ 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 ());
365365 $ this ->assertSame (InMemoryMetadataStore::class, $ metadataStoreDefinition ->getClass ());
366366
367367 $ workflowMetadata = $ metadataStoreDefinition ->getArgument (0 );
@@ -2056,21 +2056,27 @@ public function testHttpClientFullDefaultOptions()
20562056 $ this ->assertSame (['foo ' => ['bar ' => 'baz ' ]], $ defaultOptions ['extra ' ]);
20572057 }
20582058
2059- public static function provideMailer (): array
2059+ public static function provideMailer (): iterable
20602060 {
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+ ['redirected@example.org ' ],
2065+ ];
2066+ yield [
2067+ 'mailer_with_transports ' ,
2068+ [
20642069 'transport1 ' => 'smtp://example1.com ' ,
20652070 'transport2 ' => 'smtp://example2.com ' ,
2066- ]],
2071+ ],
2072+ ['redirected@example.org ' , 'redirected1@example.org ' ],
20672073 ];
20682074 }
20692075
20702076 /**
20712077 * @dataProvider provideMailer
20722078 */
2073- public function testMailer (string $ configFile , array $ expectedTransports )
2079+ public function testMailer (string $ configFile , array $ expectedTransports, array $ expectedRecipients )
20742080 {
20752081 $ container = $ this ->createContainerFromFile ($ configFile );
20762082
@@ -2082,7 +2088,7 @@ public function testMailer(string $configFile, array $expectedTransports)
20822088 $ this ->assertTrue ($ container ->hasDefinition ('mailer.envelope_listener ' ));
20832089 $ l = $ container ->getDefinition ('mailer.envelope_listener ' );
20842090 $ this ->assertSame ('sender@example.org ' , $ l ->getArgument (0 ));
2085- $ this ->assertSame ([ ' redirected@example.org ' , ' redirected1@example.org ' ] , $ l ->getArgument (1 ));
2091+ $ this ->assertSame ($ expectedRecipients , $ l ->getArgument (1 ));
20862092 $ this ->assertEquals (new Reference ('messenger.default_bus ' , ContainerInterface::NULL_ON_INVALID_REFERENCE ), $ container ->getDefinition ('mailer.mailer ' )->getArgument (1 ));
20872093
20882094 $ this ->assertTrue ($ container ->hasDefinition ('mailer.message_listener ' ));
0 commit comments