@@ -67,10 +67,10 @@ private function getTwigSwiftMailer()
67
67
return new TwigSwiftMailer (
68
68
new Swift_Mailer (
69
69
new Swift_Transport_NullTransport (
70
- $ this ->getMock ('Swift_Events_EventDispatcher ' )
70
+ $ this ->getMockBuilder ('Swift_Events_EventDispatcher ' )-> getMock ( )
71
71
)
72
72
),
73
- $ this ->getMock ('Symfony\Component\Routing\Generator\UrlGeneratorInterface ' ),
73
+ $ this ->getMockBuilder ('Symfony\Component\Routing\Generator\UrlGeneratorInterface ' )-> getMock ( ),
74
74
$ this ->getTwigEnvironment (),
75
75
array (
76
76
'template ' => array (
@@ -119,7 +119,7 @@ private function getTwigTemplate()
119
119
120
120
private function getUser ($ emailAddress )
121
121
{
122
- $ user = $ this ->getMock ('FOS\UserBundle\Model\UserInterface ' );
122
+ $ user = $ this ->getMockBuilder ('FOS\UserBundle\Model\UserInterface ' )-> getMock ( );
123
123
$ user ->method ('getEmail ' )
124
124
->willReturn ($ emailAddress )
125
125
;
@@ -129,9 +129,9 @@ private function getUser($emailAddress)
129
129
130
130
private function getEmailAddressValueObject ($ emailAddressAsString )
131
131
{
132
- $ emailAddress = $ this ->getMock ('EmailAddress ' , array (
133
- '__toString ' ,
134
- ) );
132
+ $ emailAddress = $ this ->getMockBuilder ('EmailAddress ' )
133
+ -> setMethods ( array ( '__toString ' ))
134
+ -> getMock ( );
135
135
136
136
$ emailAddress ->method ('__toString ' )
137
137
->willReturn ($ emailAddressAsString )
0 commit comments