@@ -30,7 +30,7 @@ class CachingFactoryDecoratorTest extends \PHPUnit_Framework_TestCase
3030
3131 protected function setUp ()
3232 {
33- $ this ->decoratedFactory = $ this ->getMock ('Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface ' );
33+ $ this ->decoratedFactory = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface ' )-> getMock ( );
3434 $ this ->factory = new CachingFactoryDecorator ($ this ->decoratedFactory );
3535 }
3636
@@ -295,7 +295,7 @@ public function testCreateFromFlippedChoicesDifferentValueClosure()
295295
296296 public function testCreateFromLoaderSameLoader ()
297297 {
298- $ loader = $ this ->getMock ('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface ' );
298+ $ loader = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface ' )-> getMock ( );
299299 $ list = new \stdClass ();
300300
301301 $ this ->decoratedFactory ->expects ($ this ->once ())
@@ -309,8 +309,8 @@ public function testCreateFromLoaderSameLoader()
309309
310310 public function testCreateFromLoaderDifferentLoader ()
311311 {
312- $ loader1 = $ this ->getMock ('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface ' );
313- $ loader2 = $ this ->getMock ('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface ' );
312+ $ loader1 = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface ' )-> getMock ( );
313+ $ loader2 = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface ' )-> getMock ( );
314314 $ list1 = new \stdClass ();
315315 $ list2 = new \stdClass ();
316316
@@ -329,7 +329,7 @@ public function testCreateFromLoaderDifferentLoader()
329329
330330 public function testCreateFromLoaderSameValueClosure ()
331331 {
332- $ loader = $ this ->getMock ('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface ' );
332+ $ loader = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface ' )-> getMock ( );
333333 $ list = new \stdClass ();
334334 $ closure = function () {};
335335
@@ -344,7 +344,7 @@ public function testCreateFromLoaderSameValueClosure()
344344
345345 public function testCreateFromLoaderDifferentValueClosure ()
346346 {
347- $ loader = $ this ->getMock ('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface ' );
347+ $ loader = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface ' )-> getMock ( );
348348 $ list1 = new \stdClass ();
349349 $ list2 = new \stdClass ();
350350 $ closure1 = function () {};
@@ -366,7 +366,7 @@ public function testCreateFromLoaderDifferentValueClosure()
366366 public function testCreateViewSamePreferredChoices ()
367367 {
368368 $ preferred = array ('a ' );
369- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
369+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
370370 $ view = new \stdClass ();
371371
372372 $ this ->decoratedFactory ->expects ($ this ->once ())
@@ -382,7 +382,7 @@ public function testCreateViewDifferentPreferredChoices()
382382 {
383383 $ preferred1 = array ('a ' );
384384 $ preferred2 = array ('b ' );
385- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
385+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
386386 $ view1 = new \stdClass ();
387387 $ view2 = new \stdClass ();
388388
@@ -402,7 +402,7 @@ public function testCreateViewDifferentPreferredChoices()
402402 public function testCreateViewSamePreferredChoicesClosure ()
403403 {
404404 $ preferred = function () {};
405- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
405+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
406406 $ view = new \stdClass ();
407407
408408 $ this ->decoratedFactory ->expects ($ this ->once ())
@@ -418,7 +418,7 @@ public function testCreateViewDifferentPreferredChoicesClosure()
418418 {
419419 $ preferred1 = function () {};
420420 $ preferred2 = function () {};
421- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
421+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
422422 $ view1 = new \stdClass ();
423423 $ view2 = new \stdClass ();
424424
@@ -438,7 +438,7 @@ public function testCreateViewDifferentPreferredChoicesClosure()
438438 public function testCreateViewSameLabelClosure ()
439439 {
440440 $ labels = function () {};
441- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
441+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
442442 $ view = new \stdClass ();
443443
444444 $ this ->decoratedFactory ->expects ($ this ->once ())
@@ -454,7 +454,7 @@ public function testCreateViewDifferentLabelClosure()
454454 {
455455 $ labels1 = function () {};
456456 $ labels2 = function () {};
457- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
457+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
458458 $ view1 = new \stdClass ();
459459 $ view2 = new \stdClass ();
460460
@@ -474,7 +474,7 @@ public function testCreateViewDifferentLabelClosure()
474474 public function testCreateViewSameIndexClosure ()
475475 {
476476 $ index = function () {};
477- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
477+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
478478 $ view = new \stdClass ();
479479
480480 $ this ->decoratedFactory ->expects ($ this ->once ())
@@ -490,7 +490,7 @@ public function testCreateViewDifferentIndexClosure()
490490 {
491491 $ index1 = function () {};
492492 $ index2 = function () {};
493- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
493+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
494494 $ view1 = new \stdClass ();
495495 $ view2 = new \stdClass ();
496496
@@ -510,7 +510,7 @@ public function testCreateViewDifferentIndexClosure()
510510 public function testCreateViewSameGroupByClosure ()
511511 {
512512 $ groupBy = function () {};
513- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
513+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
514514 $ view = new \stdClass ();
515515
516516 $ this ->decoratedFactory ->expects ($ this ->once ())
@@ -526,7 +526,7 @@ public function testCreateViewDifferentGroupByClosure()
526526 {
527527 $ groupBy1 = function () {};
528528 $ groupBy2 = function () {};
529- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
529+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
530530 $ view1 = new \stdClass ();
531531 $ view2 = new \stdClass ();
532532
@@ -546,7 +546,7 @@ public function testCreateViewDifferentGroupByClosure()
546546 public function testCreateViewSameAttributes ()
547547 {
548548 $ attr = array ('class ' => 'foobar ' );
549- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
549+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
550550 $ view = new \stdClass ();
551551
552552 $ this ->decoratedFactory ->expects ($ this ->once ())
@@ -562,7 +562,7 @@ public function testCreateViewDifferentAttributes()
562562 {
563563 $ attr1 = array ('class ' => 'foobar1 ' );
564564 $ attr2 = array ('class ' => 'foobar2 ' );
565- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
565+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
566566 $ view1 = new \stdClass ();
567567 $ view2 = new \stdClass ();
568568
@@ -582,7 +582,7 @@ public function testCreateViewDifferentAttributes()
582582 public function testCreateViewSameAttributesClosure ()
583583 {
584584 $ attr = function () {};
585- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
585+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
586586 $ view = new \stdClass ();
587587
588588 $ this ->decoratedFactory ->expects ($ this ->once ())
@@ -598,7 +598,7 @@ public function testCreateViewDifferentAttributesClosure()
598598 {
599599 $ attr1 = function () {};
600600 $ attr2 = function () {};
601- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
601+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
602602 $ view1 = new \stdClass ();
603603 $ view2 = new \stdClass ();
604604
0 commit comments