@@ -21,8 +21,8 @@ class ExpressionLanguageTest extends TestCase
2121{
2222 public function testCachedParse ()
2323 {
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 ();
2626 $ savedParsedExpression = null ;
2727 $ expressionLanguage = new ExpressionLanguage ($ cacheMock );
2828
@@ -107,15 +107,15 @@ public function testShortCircuitOperatorsCompile($expression, array $names, $exp
107107
108108 public function testParseThrowsInsteadOfNotice ()
109109 {
110- $ this ->expectException (' Symfony\Component\ExpressionLanguage\SyntaxError ' );
110+ $ this ->expectException (\ Symfony \Component \ExpressionLanguage \SyntaxError::class );
111111 $ this ->expectExceptionMessage ('Unexpected end of expression around position 6 for expression `node.`. ' );
112112 $ expressionLanguage = new ExpressionLanguage ();
113113 $ expressionLanguage ->parse ('node. ' , ['node ' ]);
114114 }
115115
116116 public function shortCircuitProviderEvaluate ()
117117 {
118- $ object = $ this ->getMockBuilder (' stdClass ' )->setMethods (['foo ' ])->getMock ();
118+ $ object = $ this ->getMockBuilder (\ stdClass::class )->setMethods (['foo ' ])->getMock ();
119119 $ object ->expects ($ this ->never ())->method ('foo ' );
120120
121121 return [
@@ -155,8 +155,8 @@ public function testStrictEquality()
155155
156156 public function testCachingWithDifferentNamesOrder ()
157157 {
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 ();
160160 $ expressionLanguage = new ExpressionLanguage ($ cacheMock );
161161 $ savedParsedExpression = null ;
162162
@@ -211,7 +211,7 @@ public function testOperatorCollisions()
211211 */
212212 public function testRegisterAfterParse ($ registerCallback )
213213 {
214- $ this ->expectException (' LogicException ' );
214+ $ this ->expectException (\ LogicException::class );
215215 $ el = new ExpressionLanguage ();
216216 $ el ->parse ('1 + 1 ' , []);
217217 $ registerCallback ($ el );
@@ -222,15 +222,15 @@ public function testRegisterAfterParse($registerCallback)
222222 */
223223 public function testRegisterAfterEval ($ registerCallback )
224224 {
225- $ this ->expectException (' LogicException ' );
225+ $ this ->expectException (\ LogicException::class );
226226 $ el = new ExpressionLanguage ();
227227 $ el ->evaluate ('1 + 1 ' );
228228 $ registerCallback ($ el );
229229 }
230230
231231 public function testCallBadCallable ()
232232 {
233- $ this ->expectException (' RuntimeException ' );
233+ $ this ->expectException (\ RuntimeException::class );
234234 $ this ->expectExceptionMessageMatches ('/Unable to call method "\w+" of object "\w+"./ ' );
235235 $ el = new ExpressionLanguage ();
236236 $ el ->evaluate ('foo.myfunction() ' , ['foo ' => new \stdClass ()]);
@@ -241,7 +241,7 @@ public function testCallBadCallable()
241241 */
242242 public function testRegisterAfterCompile ($ registerCallback )
243243 {
244- $ this ->expectException (' LogicException ' );
244+ $ this ->expectException (\ LogicException::class );
245245 $ el = new ExpressionLanguage ();
246246 $ el ->compile ('1 + 1 ' );
247247 $ registerCallback ($ el );
0 commit comments