@@ -21,7 +21,7 @@ class AssetReferenceTest extends \PHPUnit_Framework_TestCase
21
21
22
22
protected function setUp ()
23
23
{
24
- $ this ->am = $ this ->getMock ('Assetic \\AssetManager ' );
24
+ $ this ->am = $ this ->getMockBuilder ('Assetic \\AssetManager ' )-> getMock ( );
25
25
$ this ->ref = new AssetReference ($ this ->am , 'foo ' );
26
26
}
27
27
@@ -36,7 +36,7 @@ protected function tearDown()
36
36
*/
37
37
public function testMethods ($ method , $ returnValue )
38
38
{
39
- $ asset = $ this ->getMock ('Assetic \\Asset \\AssetInterface ' );
39
+ $ asset = $ this ->getMockBuilder ('Assetic \\Asset \\AssetInterface ' )-> getMock ( );
40
40
41
41
$ this ->am ->expects ($ this ->once ())
42
42
->method ('get ' )
@@ -63,12 +63,12 @@ public function getMethodAndRetVal()
63
63
public function testLazyFilters ()
64
64
{
65
65
$ this ->am ->expects ($ this ->never ())->method ('get ' );
66
- $ this ->ref ->ensureFilter ($ this ->getMock ('Assetic \\Filter \\FilterInterface ' ));
66
+ $ this ->ref ->ensureFilter ($ this ->getMockBuilder ('Assetic \\Filter \\FilterInterface ' )-> getMock ( ));
67
67
}
68
68
69
69
public function testFilterFlush ()
70
70
{
71
- $ asset = $ this ->getMock ('Assetic \\Asset \\AssetInterface ' );
71
+ $ asset = $ this ->getMockBuilder ('Assetic \\Asset \\AssetInterface ' )-> getMock ( );
72
72
73
73
$ this ->am ->expects ($ this ->exactly (2 ))
74
74
->method ('get ' )
@@ -79,14 +79,14 @@ public function testFilterFlush()
79
79
->method ('getFilters ' )
80
80
->will ($ this ->returnValue (array ()));
81
81
82
- $ this ->ref ->ensureFilter ($ this ->getMock ('Assetic \\Filter \\FilterInterface ' ));
82
+ $ this ->ref ->ensureFilter ($ this ->getMockBuilder ('Assetic \\Filter \\FilterInterface ' )-> getMock ( ));
83
83
84
84
$ this ->assertInternalType ('array ' , $ this ->ref ->getFilters (), '->getFilters() flushes and returns filters ' );
85
85
}
86
86
87
87
public function testSetContent ()
88
88
{
89
- $ asset = $ this ->getMock ('Assetic \\Asset \\AssetInterface ' );
89
+ $ asset = $ this ->getMockBuilder ('Assetic \\Asset \\AssetInterface ' )-> getMock ( );
90
90
91
91
$ this ->am ->expects ($ this ->once ())
92
92
->method ('get ' )
@@ -101,8 +101,8 @@ public function testSetContent()
101
101
102
102
public function testLoad ()
103
103
{
104
- $ filter = $ this ->getMock ('Assetic \\Filter \\FilterInterface ' );
105
- $ asset = $ this ->getMock ('Assetic \\Asset \\AssetInterface ' );
104
+ $ filter = $ this ->getMockBuilder ('Assetic \\Filter \\FilterInterface ' )-> getMock ( );
105
+ $ asset = $ this ->getMockBuilder ('Assetic \\Asset \\AssetInterface ' )-> getMock ( );
106
106
107
107
$ this ->am ->expects ($ this ->exactly (2 ))
108
108
->method ('get ' )
@@ -117,8 +117,8 @@ public function testLoad()
117
117
118
118
public function testDump ()
119
119
{
120
- $ filter = $ this ->getMock ('Assetic \\Filter \\FilterInterface ' );
121
- $ asset = $ this ->getMock ('Assetic \\Asset \\AssetInterface ' );
120
+ $ filter = $ this ->getMockBuilder ('Assetic \\Filter \\FilterInterface ' )-> getMock ( );
121
+ $ asset = $ this ->getMockBuilder ('Assetic \\Asset \\AssetInterface ' )-> getMock ( );
122
122
123
123
$ this ->am ->expects ($ this ->exactly (2 ))
124
124
->method ('get ' )
@@ -133,9 +133,9 @@ public function testDump()
133
133
134
134
public function testClone ()
135
135
{
136
- $ filter1 = $ this ->getMock ('Assetic \\Filter \\FilterInterface ' );
137
- $ filter2 = $ this ->getMock ('Assetic \\Filter \\FilterInterface ' );
138
- $ filter3 = $ this ->getMock ('Assetic \\Filter \\FilterInterface ' );
136
+ $ filter1 = $ this ->getMockBuilder ('Assetic \\Filter \\FilterInterface ' )-> getMock ( );
137
+ $ filter2 = $ this ->getMockBuilder ('Assetic \\Filter \\FilterInterface ' )-> getMock ( );
138
+ $ filter3 = $ this ->getMockBuilder ('Assetic \\Filter \\FilterInterface ' )-> getMock ( );
139
139
140
140
$ asset = new StringAsset ('' );
141
141
$ this ->am ->expects ($ this ->any ())
0 commit comments