@@ -21,8 +21,8 @@ class ExpressionLanguageTest extends TestCase
21
21
{
22
22
public function testCachedParse ()
23
23
{
24
- $ cacheMock = $ this ->getMockBuilder (' Psr\Cache\CacheItemPoolInterface ' )->getMock ();
25
- $ cacheItemMock = $ this ->getMockBuilder (' Psr\Cache\CacheItemInterface ' )->getMock ();
24
+ $ cacheMock = $ this ->getMockBuilder (\ Psr \Cache \CacheItemPoolInterface::class )->getMock ();
25
+ $ cacheItemMock = $ this ->getMockBuilder (\ Psr \Cache \CacheItemInterface::class )->getMock ();
26
26
$ savedParsedExpression = null ;
27
27
$ expressionLanguage = new ExpressionLanguage ($ cacheMock );
28
28
@@ -107,15 +107,15 @@ public function testShortCircuitOperatorsCompile($expression, array $names, $exp
107
107
108
108
public function testParseThrowsInsteadOfNotice ()
109
109
{
110
- $ this ->expectException (' Symfony\Component\ExpressionLanguage\SyntaxError ' );
110
+ $ this ->expectException (\ Symfony \Component \ExpressionLanguage \SyntaxError::class );
111
111
$ this ->expectExceptionMessage ('Unexpected end of expression around position 6 for expression `node.`. ' );
112
112
$ expressionLanguage = new ExpressionLanguage ();
113
113
$ expressionLanguage ->parse ('node. ' , ['node ' ]);
114
114
}
115
115
116
116
public function shortCircuitProviderEvaluate ()
117
117
{
118
- $ object = $ this ->getMockBuilder (' stdClass ' )->setMethods (['foo ' ])->getMock ();
118
+ $ object = $ this ->getMockBuilder (\ stdClass::class )->setMethods (['foo ' ])->getMock ();
119
119
$ object ->expects ($ this ->never ())->method ('foo ' );
120
120
121
121
return [
@@ -155,8 +155,8 @@ public function testStrictEquality()
155
155
156
156
public function testCachingWithDifferentNamesOrder ()
157
157
{
158
- $ cacheMock = $ this ->getMockBuilder (' Psr\Cache\CacheItemPoolInterface ' )->getMock ();
159
- $ cacheItemMock = $ this ->getMockBuilder (' Psr\Cache\CacheItemInterface ' )->getMock ();
158
+ $ cacheMock = $ this ->getMockBuilder (\ Psr \Cache \CacheItemPoolInterface::class )->getMock ();
159
+ $ cacheItemMock = $ this ->getMockBuilder (\ Psr \Cache \CacheItemInterface::class )->getMock ();
160
160
$ expressionLanguage = new ExpressionLanguage ($ cacheMock );
161
161
$ savedParsedExpression = null ;
162
162
@@ -211,7 +211,7 @@ public function testOperatorCollisions()
211
211
*/
212
212
public function testRegisterAfterParse ($ registerCallback )
213
213
{
214
- $ this ->expectException (' LogicException ' );
214
+ $ this ->expectException (\ LogicException::class );
215
215
$ el = new ExpressionLanguage ();
216
216
$ el ->parse ('1 + 1 ' , []);
217
217
$ registerCallback ($ el );
@@ -222,15 +222,15 @@ public function testRegisterAfterParse($registerCallback)
222
222
*/
223
223
public function testRegisterAfterEval ($ registerCallback )
224
224
{
225
- $ this ->expectException (' LogicException ' );
225
+ $ this ->expectException (\ LogicException::class );
226
226
$ el = new ExpressionLanguage ();
227
227
$ el ->evaluate ('1 + 1 ' );
228
228
$ registerCallback ($ el );
229
229
}
230
230
231
231
public function testCallBadCallable ()
232
232
{
233
- $ this ->expectException (' RuntimeException ' );
233
+ $ this ->expectException (\ RuntimeException::class );
234
234
$ this ->expectExceptionMessageMatches ('/Unable to call method "\w+" of object "\w+"./ ' );
235
235
$ el = new ExpressionLanguage ();
236
236
$ el ->evaluate ('foo.myfunction() ' , ['foo ' => new \stdClass ()]);
@@ -241,7 +241,7 @@ public function testCallBadCallable()
241
241
*/
242
242
public function testRegisterAfterCompile ($ registerCallback )
243
243
{
244
- $ this ->expectException (' LogicException ' );
244
+ $ this ->expectException (\ LogicException::class );
245
245
$ el = new ExpressionLanguage ();
246
246
$ el ->compile ('1 + 1 ' );
247
247
$ registerCallback ($ el );
0 commit comments