@@ -355,7 +355,7 @@ public function testWorkflows()
355355 $ this ->assertSame ('state_machine.pull_request.metadata_store ' , (string ) $ metadataStoreReference );
356356
357357 $ metadataStoreDefinition = $ container ->getDefinition ('state_machine.pull_request.metadata_store ' );
358- $ this ->assertSame (Workflow \ Metadata \ InMemoryMetadataStore::class, $ metadataStoreDefinition ->getClass ());
358+ $ this ->assertSame (InMemoryMetadataStore::class, $ metadataStoreDefinition ->getClass ());
359359 $ this ->assertSame (InMemoryMetadataStore::class, $ metadataStoreDefinition ->getClass ());
360360
361361 $ workflowMetadata = $ metadataStoreDefinition ->getArgument (0 );
@@ -1989,21 +1989,27 @@ public function testHttpClientFullDefaultOptions()
19891989 $ this ->assertSame (['foo ' => ['bar ' => 'baz ' ]], $ defaultOptions ['extra ' ]);
19901990 }
19911991
1992- public static function provideMailer (): array
1992+ public static function provideMailer (): iterable
19931993 {
1994- return [
1995- ['mailer_with_dsn ' , ['main ' => 'smtp://example.com ' ]],
1996- ['mailer_with_transports ' , [
1994+ yield [
1995+ 'mailer_with_dsn ' ,
1996+ ['main ' => 'smtp://example.com ' ],
1997+ ['redirected@example.org ' ],
1998+ ];
1999+ yield [
2000+ 'mailer_with_transports ' ,
2001+ [
19972002 'transport1 ' => 'smtp://example1.com ' ,
19982003 'transport2 ' => 'smtp://example2.com ' ,
1999- ]],
2004+ ],
2005+ ['redirected@example.org ' , 'redirected1@example.org ' ],
20002006 ];
20012007 }
20022008
20032009 /**
20042010 * @dataProvider provideMailer
20052011 */
2006- public function testMailer (string $ configFile , array $ expectedTransports )
2012+ public function testMailer (string $ configFile , array $ expectedTransports, array $ expectedRecipients )
20072013 {
20082014 $ container = $ this ->createContainerFromFile ($ configFile );
20092015
@@ -2015,7 +2021,7 @@ public function testMailer(string $configFile, array $expectedTransports)
20152021 $ this ->assertTrue ($ container ->hasDefinition ('mailer.envelope_listener ' ));
20162022 $ l = $ container ->getDefinition ('mailer.envelope_listener ' );
20172023 $ this ->assertSame ('sender@example.org ' , $ l ->getArgument (0 ));
2018- $ this ->assertSame ([ ' redirected@example.org ' , ' redirected1@example.org ' ] , $ l ->getArgument (1 ));
2024+ $ this ->assertSame ($ expectedRecipients , $ l ->getArgument (1 ));
20192025 $ this ->assertEquals (new Reference ('messenger.default_bus ' , ContainerInterface::NULL_ON_INVALID_REFERENCE ), $ container ->getDefinition ('mailer.mailer ' )->getArgument (1 ));
20202026
20212027 $ this ->assertTrue ($ container ->hasDefinition ('mailer.message_listener ' ));
0 commit comments