1212namespace Symfony \Component \CssSelector \Tests \XPath ;
1313
1414use PHPUnit \Framework \TestCase ;
15+ use Symfony \Component \CssSelector \Exception \ExpressionErrorException ;
1516use Symfony \Component \CssSelector \Node \ElementNode ;
1617use Symfony \Component \CssSelector \Node \FunctionNode ;
1718use Symfony \Component \CssSelector \Parser \Parser ;
@@ -37,23 +38,23 @@ public function testCssToXPath($css, $xpath)
3738
3839 public function testCssToXPathPseudoElement ()
3940 {
40- $ this ->expectException (\ Symfony \ Component \ CssSelector \ Exception \ ExpressionErrorException::class);
41+ $ this ->expectException (ExpressionErrorException::class);
4142 $ translator = new Translator ();
4243 $ translator ->registerExtension (new HtmlExtension ($ translator ));
4344 $ translator ->cssToXPath ('e::first-line ' );
4445 }
4546
4647 public function testGetExtensionNotExistsExtension ()
4748 {
48- $ this ->expectException (\ Symfony \ Component \ CssSelector \ Exception \ ExpressionErrorException::class);
49+ $ this ->expectException (ExpressionErrorException::class);
4950 $ translator = new Translator ();
5051 $ translator ->registerExtension (new HtmlExtension ($ translator ));
5152 $ translator ->getExtension ('fake ' );
5253 }
5354
5455 public function testAddCombinationNotExistsExtension ()
5556 {
56- $ this ->expectException (\ Symfony \ Component \ CssSelector \ Exception \ ExpressionErrorException::class);
57+ $ this ->expectException (ExpressionErrorException::class);
5758 $ translator = new Translator ();
5859 $ translator ->registerExtension (new HtmlExtension ($ translator ));
5960 $ parser = new Parser ();
@@ -64,7 +65,7 @@ public function testAddCombinationNotExistsExtension()
6465
6566 public function testAddFunctionNotExistsFunction ()
6667 {
67- $ this ->expectException (\ Symfony \ Component \ CssSelector \ Exception \ ExpressionErrorException::class);
68+ $ this ->expectException (ExpressionErrorException::class);
6869 $ translator = new Translator ();
6970 $ translator ->registerExtension (new HtmlExtension ($ translator ));
7071 $ xpath = new XPathExpr ();
@@ -74,7 +75,7 @@ public function testAddFunctionNotExistsFunction()
7475
7576 public function testAddPseudoClassNotExistsClass ()
7677 {
77- $ this ->expectException (\ Symfony \ Component \ CssSelector \ Exception \ ExpressionErrorException::class);
78+ $ this ->expectException (ExpressionErrorException::class);
7879 $ translator = new Translator ();
7980 $ translator ->registerExtension (new HtmlExtension ($ translator ));
8081 $ xpath = new XPathExpr ();
@@ -83,7 +84,7 @@ public function testAddPseudoClassNotExistsClass()
8384
8485 public function testAddAttributeMatchingClassNotExistsClass ()
8586 {
86- $ this ->expectException (\ Symfony \ Component \ CssSelector \ Exception \ ExpressionErrorException::class);
87+ $ this ->expectException (ExpressionErrorException::class);
8788 $ translator = new Translator ();
8889 $ translator ->registerExtension (new HtmlExtension ($ translator ));
8990 $ xpath = new XPathExpr ();
0 commit comments