@@ -1603,7 +1603,7 @@ public function testMessageWithLabel1()
1603
1603
->disableOriginalConstructor ()
1604
1604
->getMock ()
1605
1605
;
1606
- $ translator = $ this ->getMockBuilder (TranslatorInterface::class)-> getMock ( );
1606
+ $ translator = $ this ->createMock (TranslatorInterface::class);
1607
1607
$ translator ->expects ($ this ->any ())->method ('trans ' )->willReturnMap ([
1608
1608
['Name ' , [], null , null , 'Custom Name ' ],
1609
1609
]);
@@ -1630,7 +1630,7 @@ public function testMessageWithLabel1()
1630
1630
1631
1631
public function testMessageWithLabel2 ()
1632
1632
{
1633
- $ translator = $ this ->getMockBuilder (TranslatorInterface::class)-> getMock ( );
1633
+ $ translator = $ this ->createMock (TranslatorInterface::class);
1634
1634
$ translator ->expects ($ this ->any ())->method ('trans ' )->willReturnMap ([
1635
1635
['options_label ' , [], null , null , 'Translated Label ' ],
1636
1636
]);
@@ -1668,7 +1668,7 @@ public function testMessageWithLabel2()
1668
1668
1669
1669
public function testMessageWithLabelFormat1 ()
1670
1670
{
1671
- $ translator = $ this ->getMockBuilder (TranslatorInterface::class)-> getMock ( );
1671
+ $ translator = $ this ->createMock (TranslatorInterface::class);
1672
1672
$ translator ->expects ($ this ->any ())->method ('trans ' )->willReturnMap ([
1673
1673
['form.custom ' , [], null , null , 'Translated 1st Custom Label ' ],
1674
1674
]);
@@ -1706,7 +1706,7 @@ public function testMessageWithLabelFormat1()
1706
1706
1707
1707
public function testMessageWithLabelFormat2 ()
1708
1708
{
1709
- $ translator = $ this ->getMockBuilder (TranslatorInterface::class)-> getMock ( );
1709
+ $ translator = $ this ->createMock (TranslatorInterface::class);
1710
1710
$ translator ->expects ($ this ->any ())->method ('trans ' )->willReturnMap ([
1711
1711
['form_custom-id ' , [], null , null , 'Translated 2nd Custom Label ' ],
1712
1712
]);
@@ -1793,7 +1793,7 @@ public function testTranslatorNotCalledWithoutLabel()
1793
1793
->disableOriginalConstructor ()
1794
1794
->getMock ()
1795
1795
;
1796
- $ translator = $ this ->getMockBuilder (TranslatorInterface::class)-> getMock ( );
1796
+ $ translator = $ this ->createMock (TranslatorInterface::class);
1797
1797
$ translator ->expects ($ this ->never ())->method ('trans ' );
1798
1798
$ this ->mapper = new ViolationMapper ($ renderer , $ translator );
1799
1799
0 commit comments