11
11
12
12
namespace Symfony \Component \Messenger \Tests \Transport \Doctrine ;
13
13
14
+ use Doctrine \Common \Persistence \ConnectionRegistry ;
14
15
use PHPUnit \Framework \TestCase ;
15
- use Symfony \Bridge \Doctrine \RegistryInterface ;
16
16
use Symfony \Component \Messenger \Transport \Doctrine \Connection ;
17
17
use Symfony \Component \Messenger \Transport \Doctrine \DoctrineTransport ;
18
18
use Symfony \Component \Messenger \Transport \Doctrine \DoctrineTransportFactory ;
@@ -23,7 +23,7 @@ class DoctrineTransportFactoryTest extends TestCase
23
23
public function testSupports ()
24
24
{
25
25
$ factory = new DoctrineTransportFactory (
26
- $ this ->getMockBuilder (RegistryInterface ::class)->getMock ()
26
+ $ this ->getMockBuilder (ConnectionRegistry ::class)->getMock ()
27
27
);
28
28
29
29
$ this ->assertTrue ($ factory ->supports ('doctrine://default ' , []));
@@ -35,7 +35,7 @@ public function testCreateTransport()
35
35 $ connection = $ this ->getMockBuilder (\Doctrine \DBAL \Connection::class)
36
36
->disableOriginalConstructor ()
37
37
->getMock ();
38
- $ registry = $ this ->getMockBuilder (RegistryInterface ::class)->getMock ();
38
+ $ registry = $ this ->getMockBuilder (ConnectionRegistry ::class)->getMock ();
39
39
$ registry ->expects ($ this ->once ())
40
40
->method ('getConnection ' )
41
41
->willReturn ($ connection );
@@ -55,7 +55,7 @@ public function testCreateTransport()
55
55
*/
56
56
public function testCreateTransportMustThrowAnExceptionIfManagerIsNotFound ()
57
57
{
58
- $ registry = $ this ->getMockBuilder (RegistryInterface ::class)->getMock ();
58
+ $ registry = $ this ->getMockBuilder (ConnectionRegistry ::class)->getMock ();
59
59
$ registry ->expects ($ this ->once ())
60
60
->method ('getConnection ' )
61
61
->willReturnCallback (function () {
0 commit comments