@@ -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
@@ -157,7 +157,7 @@ public function testCreateFromChoicesDifferentValueClosure()
157157
158158 public function testCreateFromLoaderSameLoader ()
159159 {
160- $ loader = $ this ->getMock ('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface ' );
160+ $ loader = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface ' )-> getMock ( );
161161 $ list = new \stdClass ();
162162
163163 $ this ->decoratedFactory ->expects ($ this ->once ())
@@ -171,8 +171,8 @@ public function testCreateFromLoaderSameLoader()
171171
172172 public function testCreateFromLoaderDifferentLoader ()
173173 {
174- $ loader1 = $ this ->getMock ('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface ' );
175- $ loader2 = $ this ->getMock ('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface ' );
174+ $ loader1 = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface ' )-> getMock ( );
175+ $ loader2 = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface ' )-> getMock ( );
176176 $ list1 = new \stdClass ();
177177 $ list2 = new \stdClass ();
178178
@@ -191,7 +191,7 @@ public function testCreateFromLoaderDifferentLoader()
191191
192192 public function testCreateFromLoaderSameValueClosure ()
193193 {
194- $ loader = $ this ->getMock ('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface ' );
194+ $ loader = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface ' )-> getMock ( );
195195 $ list = new \stdClass ();
196196 $ closure = function () {};
197197
@@ -206,7 +206,7 @@ public function testCreateFromLoaderSameValueClosure()
206206
207207 public function testCreateFromLoaderDifferentValueClosure ()
208208 {
209- $ loader = $ this ->getMock ('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface ' );
209+ $ loader = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\Loader\ChoiceLoaderInterface ' )-> getMock ( );
210210 $ list1 = new \stdClass ();
211211 $ list2 = new \stdClass ();
212212 $ closure1 = function () {};
@@ -228,7 +228,7 @@ public function testCreateFromLoaderDifferentValueClosure()
228228 public function testCreateViewSamePreferredChoices ()
229229 {
230230 $ preferred = array ('a ' );
231- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
231+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
232232 $ view = new \stdClass ();
233233
234234 $ this ->decoratedFactory ->expects ($ this ->once ())
@@ -244,7 +244,7 @@ public function testCreateViewDifferentPreferredChoices()
244244 {
245245 $ preferred1 = array ('a ' );
246246 $ preferred2 = array ('b ' );
247- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
247+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
248248 $ view1 = new \stdClass ();
249249 $ view2 = new \stdClass ();
250250
@@ -264,7 +264,7 @@ public function testCreateViewDifferentPreferredChoices()
264264 public function testCreateViewSamePreferredChoicesClosure ()
265265 {
266266 $ preferred = function () {};
267- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
267+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
268268 $ view = new \stdClass ();
269269
270270 $ this ->decoratedFactory ->expects ($ this ->once ())
@@ -280,7 +280,7 @@ public function testCreateViewDifferentPreferredChoicesClosure()
280280 {
281281 $ preferred1 = function () {};
282282 $ preferred2 = function () {};
283- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
283+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
284284 $ view1 = new \stdClass ();
285285 $ view2 = new \stdClass ();
286286
@@ -300,7 +300,7 @@ public function testCreateViewDifferentPreferredChoicesClosure()
300300 public function testCreateViewSameLabelClosure ()
301301 {
302302 $ labels = function () {};
303- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
303+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
304304 $ view = new \stdClass ();
305305
306306 $ this ->decoratedFactory ->expects ($ this ->once ())
@@ -316,7 +316,7 @@ public function testCreateViewDifferentLabelClosure()
316316 {
317317 $ labels1 = function () {};
318318 $ labels2 = function () {};
319- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
319+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
320320 $ view1 = new \stdClass ();
321321 $ view2 = new \stdClass ();
322322
@@ -336,7 +336,7 @@ public function testCreateViewDifferentLabelClosure()
336336 public function testCreateViewSameIndexClosure ()
337337 {
338338 $ index = function () {};
339- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
339+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
340340 $ view = new \stdClass ();
341341
342342 $ this ->decoratedFactory ->expects ($ this ->once ())
@@ -352,7 +352,7 @@ public function testCreateViewDifferentIndexClosure()
352352 {
353353 $ index1 = function () {};
354354 $ index2 = function () {};
355- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
355+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
356356 $ view1 = new \stdClass ();
357357 $ view2 = new \stdClass ();
358358
@@ -372,7 +372,7 @@ public function testCreateViewDifferentIndexClosure()
372372 public function testCreateViewSameGroupByClosure ()
373373 {
374374 $ groupBy = function () {};
375- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
375+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
376376 $ view = new \stdClass ();
377377
378378 $ this ->decoratedFactory ->expects ($ this ->once ())
@@ -388,7 +388,7 @@ public function testCreateViewDifferentGroupByClosure()
388388 {
389389 $ groupBy1 = function () {};
390390 $ groupBy2 = function () {};
391- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
391+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
392392 $ view1 = new \stdClass ();
393393 $ view2 = new \stdClass ();
394394
@@ -408,7 +408,7 @@ public function testCreateViewDifferentGroupByClosure()
408408 public function testCreateViewSameAttributes ()
409409 {
410410 $ attr = array ('class ' => 'foobar ' );
411- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
411+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
412412 $ view = new \stdClass ();
413413
414414 $ this ->decoratedFactory ->expects ($ this ->once ())
@@ -424,7 +424,7 @@ public function testCreateViewDifferentAttributes()
424424 {
425425 $ attr1 = array ('class ' => 'foobar1 ' );
426426 $ attr2 = array ('class ' => 'foobar2 ' );
427- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
427+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
428428 $ view1 = new \stdClass ();
429429 $ view2 = new \stdClass ();
430430
@@ -444,7 +444,7 @@ public function testCreateViewDifferentAttributes()
444444 public function testCreateViewSameAttributesClosure ()
445445 {
446446 $ attr = function () {};
447- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
447+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
448448 $ view = new \stdClass ();
449449
450450 $ this ->decoratedFactory ->expects ($ this ->once ())
@@ -460,7 +460,7 @@ public function testCreateViewDifferentAttributesClosure()
460460 {
461461 $ attr1 = function () {};
462462 $ attr2 = function () {};
463- $ list = $ this ->getMock ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' );
463+ $ list = $ this ->getMockBuilder ('Symfony\Component\Form\ChoiceList\ChoiceListInterface ' )-> getMock ( );
464464 $ view1 = new \stdClass ();
465465 $ view2 = new \stdClass ();
466466
0 commit comments