File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ public function testGetMetadataFor()
26
26
{
27
27
$ metadata = new ClassMetadata (Dummy::class);
28
28
29
- $ decorated = $ this ->getMock (ClassMetadataFactoryInterface::class);
29
+ $ decorated = $ this ->getMockBuilder (ClassMetadataFactoryInterface::class)-> getMock ( );
30
30
$ decorated
31
31
->expects ($ this ->once ())
32
32
->method ('getMetadataFor ' )
@@ -42,7 +42,7 @@ public function testGetMetadataFor()
42
42
43
43
public function testHasMetadataFor ()
44
44
{
45
- $ decorated = $ this ->getMock (ClassMetadataFactoryInterface::class);
45
+ $ decorated = $ this ->getMockBuilder (ClassMetadataFactoryInterface::class)-> getMock ( );
46
46
$ decorated
47
47
->expects ($ this ->once ())
48
48
->method ('hasMetadataFor ' )
@@ -59,7 +59,7 @@ public function testHasMetadataFor()
59
59
*/
60
60
public function testInvalidClassThrowsException ()
61
61
{
62
- $ decorated = $ this ->getMock (ClassMetadataFactoryInterface::class);
62
+ $ decorated = $ this ->getMockBuilder (ClassMetadataFactoryInterface::class)-> getMock ( );
63
63
$ factory = new CacheClassMetadataFactory ($ decorated , new ArrayAdapter ());
64
64
65
65
$ factory ->getMetadataFor ('Not\Exist ' );
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ public function testHasMetadataFor()
50
50
*/
51
51
public function testCacheExists ()
52
52
{
53
- $ cache = $ this ->getMock ('Doctrine\Common\Cache\Cache ' );
53
+ $ cache = $ this ->getMockBuilder ('Doctrine\Common\Cache\Cache ' )-> getMock ( );
54
54
$ cache
55
55
->expects ($ this ->once ())
56
56
->method ('fetch ' )
@@ -66,7 +66,7 @@ public function testCacheExists()
66
66
*/
67
67
public function testCacheNotExists ()
68
68
{
69
- $ cache = $ this ->getMock ('Doctrine\Common\Cache\Cache ' );
69
+ $ cache = $ this ->getMockBuilder ('Doctrine\Common\Cache\Cache ' )-> getMock ( );
70
70
$ cache ->method ('fetch ' )->will ($ this ->returnValue (false ));
71
71
$ cache ->method ('save ' );
72
72
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ class JsonSerializableNormalizerTest extends \PHPUnit_Framework_TestCase
33
33
34
34
protected function setUp ()
35
35
{
36
- $ this ->serializer = $ this ->getMock (JsonSerializerNormalizer::class);
36
+ $ this ->serializer = $ this ->getMockBuilder (JsonSerializerNormalizer::class)-> getMock ( );
37
37
$ this ->normalizer = new JsonSerializableNormalizer ();
38
38
$ this ->normalizer ->setSerializer ($ this ->serializer );
39
39
}
Original file line number Diff line number Diff line change @@ -319,7 +319,7 @@ public function testDeserializeArray()
319
319
320
320
public function testNormalizerAware ()
321
321
{
322
- $ normalizerAware = $ this ->getMock (NormalizerAwareInterface::class);
322
+ $ normalizerAware = $ this ->getMockBuilder (NormalizerAwareInterface::class)-> getMock ( );
323
323
$ normalizerAware ->expects ($ this ->once ())
324
324
->method ('setNormalizer ' )
325
325
->with ($ this ->isInstanceOf (NormalizerInterface::class));
@@ -329,7 +329,7 @@ public function testNormalizerAware()
329
329
330
330
public function testDenormalizerAware ()
331
331
{
332
- $ denormalizerAware = $ this ->getMock (DenormalizerAwareInterface::class);
332
+ $ denormalizerAware = $ this ->getMockBuilder (DenormalizerAwareInterface::class)-> getMock ( );
333
333
$ denormalizerAware ->expects ($ this ->once ())
334
334
->method ('setDenormalizer ' )
335
335
->with ($ this ->isInstanceOf (DenormalizerInterface::class));
You can’t perform that action at this time.
0 commit comments