@@ -1603,7 +1603,7 @@ public function testMessageWithLabel1()
16031603 ->disableOriginalConstructor ()
16041604 ->getMock ()
16051605 ;
1606- $ translator = $ this ->getMockBuilder (TranslatorInterface::class)-> getMock ( );
1606+ $ translator = $ this ->createMock (TranslatorInterface::class);
16071607 $ translator ->expects ($ this ->any ())->method ('trans ' )->willReturnMap ([
16081608 ['Name ' , [], null , null , 'Custom Name ' ],
16091609 ]);
@@ -1630,7 +1630,7 @@ public function testMessageWithLabel1()
16301630
16311631 public function testMessageWithLabel2 ()
16321632 {
1633- $ translator = $ this ->getMockBuilder (TranslatorInterface::class)-> getMock ( );
1633+ $ translator = $ this ->createMock (TranslatorInterface::class);
16341634 $ translator ->expects ($ this ->any ())->method ('trans ' )->willReturnMap ([
16351635 ['options_label ' , [], null , null , 'Translated Label ' ],
16361636 ]);
@@ -1668,7 +1668,7 @@ public function testMessageWithLabel2()
16681668
16691669 public function testMessageWithLabelFormat1 ()
16701670 {
1671- $ translator = $ this ->getMockBuilder (TranslatorInterface::class)-> getMock ( );
1671+ $ translator = $ this ->createMock (TranslatorInterface::class);
16721672 $ translator ->expects ($ this ->any ())->method ('trans ' )->willReturnMap ([
16731673 ['form.custom ' , [], null , null , 'Translated 1st Custom Label ' ],
16741674 ]);
@@ -1706,7 +1706,7 @@ public function testMessageWithLabelFormat1()
17061706
17071707 public function testMessageWithLabelFormat2 ()
17081708 {
1709- $ translator = $ this ->getMockBuilder (TranslatorInterface::class)-> getMock ( );
1709+ $ translator = $ this ->createMock (TranslatorInterface::class);
17101710 $ translator ->expects ($ this ->any ())->method ('trans ' )->willReturnMap ([
17111711 ['form_custom-id ' , [], null , null , 'Translated 2nd Custom Label ' ],
17121712 ]);
@@ -1793,7 +1793,7 @@ public function testTranslatorNotCalledWithoutLabel()
17931793 ->disableOriginalConstructor ()
17941794 ->getMock ()
17951795 ;
1796- $ translator = $ this ->getMockBuilder (TranslatorInterface::class)-> getMock ( );
1796+ $ translator = $ this ->createMock (TranslatorInterface::class);
17971797 $ translator ->expects ($ this ->never ())->method ('trans ' );
17981798 $ this ->mapper = new ViolationMapper ($ renderer , $ translator );
17991799
0 commit comments