File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -429,10 +429,10 @@ public function testRenderFormTwig()
429
429
{
430
430
$ formView = new FormView ();
431
431
432
- $ form = $ this ->getMockBuilder (FormInterface::class)-> getMock ( );
432
+ $ form = $ this ->createMock (FormInterface::class);
433
433
$ form ->expects ($ this ->once ())->method ('createView ' )->willReturn ($ formView );
434
434
435
- $ twig = $ this ->getMockBuilder (Environment::class)-> disableOriginalConstructor ()-> getMock ( );
435
+ $ twig = $ this ->createMock (Environment::class);
436
436
$ twig ->expects ($ this ->once ())->method ('render ' )->with ('foo ' , ['form ' => $ formView , 'bar ' => 'bar ' ])->willReturn ('bar ' );
437
437
438
438
$ container = new Container ();
@@ -451,12 +451,12 @@ public function testRenderInvalidFormTwig()
451
451
{
452
452
$ formView = new FormView ();
453
453
454
- $ form = $ this ->getMockBuilder (FormInterface::class)-> getMock ( );
454
+ $ form = $ this ->createMock (FormInterface::class);
455
455
$ form ->expects ($ this ->once ())->method ('createView ' )->willReturn ($ formView );
456
456
$ form ->expects ($ this ->once ())->method ('isSubmitted ' )->willReturn (true );
457
457
$ form ->expects ($ this ->once ())->method ('isValid ' )->willReturn (false );
458
458
459
- $ twig = $ this ->getMockBuilder (Environment::class)-> disableOriginalConstructor ()-> getMock ( );
459
+ $ twig = $ this ->createMock (Environment::class);
460
460
$ twig ->expects ($ this ->once ())->method ('render ' )->with ('foo ' , ['form ' => $ formView , 'bar ' => 'bar ' ])->willReturn ('bar ' );
461
461
462
462
$ container = new Container ();
You can’t perform that action at this time.
0 commit comments