@@ -355,7 +355,7 @@ public function testWorkflows()
355
355
$ this ->assertSame ('state_machine.pull_request.metadata_store ' , (string ) $ metadataStoreReference );
356
356
357
357
$ 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 ());
359
359
$ this ->assertSame (InMemoryMetadataStore::class, $ metadataStoreDefinition ->getClass ());
360
360
361
361
$ workflowMetadata = $ metadataStoreDefinition ->getArgument (0 );
@@ -1989,21 +1989,27 @@ public function testHttpClientFullDefaultOptions()
1989
1989
$ this ->assertSame (['foo ' => ['bar ' => 'baz ' ]], $ defaultOptions ['extra ' ]);
1990
1990
}
1991
1991
1992
- public static function provideMailer (): array
1992
+ public static function provideMailer (): iterable
1993
1993
{
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
+
1998
+ ];
1999
+ yield [
2000
+ 'mailer_with_transports ' ,
2001
+ [
1997
2002
'transport1 ' => 'smtp://example1.com ' ,
1998
2003
'transport2 ' => 'smtp://example2.com ' ,
1999
- ]],
2004
+ ],
2005
+
2000
2006
];
2001
2007
}
2002
2008
2003
2009
/**
2004
2010
* @dataProvider provideMailer
2005
2011
*/
2006
- public function testMailer (string $ configFile , array $ expectedTransports )
2012
+ public function testMailer (string $ configFile , array $ expectedTransports, array $ expectedRecipients )
2007
2013
{
2008
2014
$ container = $ this ->createContainerFromFile ($ configFile );
2009
2015
@@ -2015,7 +2021,7 @@ public function testMailer(string $configFile, array $expectedTransports)
2015
2021
$ this ->assertTrue ($ container ->hasDefinition ('mailer.envelope_listener ' ));
2016
2022
$ l = $ container ->getDefinition ('mailer.envelope_listener ' );
2017
2023
$ this ->
assertSame (
'[email protected] ' ,
$ l->
getArgument (
0 ));
2018
- $ this ->
assertSame (
[ ' [email protected] ' , ' [email protected] ' ] ,
$ l->
getArgument (
1 ));
2024
+ $ this ->assertSame ($ expectedRecipients , $ l ->getArgument (1 ));
2019
2025
$ this ->assertEquals (new Reference ('messenger.default_bus ' , ContainerInterface::NULL_ON_INVALID_REFERENCE ), $ container ->getDefinition ('mailer.mailer ' )->getArgument (1 ));
2020
2026
2021
2027
$ this ->assertTrue ($ container ->hasDefinition ('mailer.message_listener ' ));
0 commit comments