12
12
namespace Symfony \Component \CssSelector \Tests \XPath ;
13
13
14
14
use PHPUnit \Framework \TestCase ;
15
+ use Symfony \Component \CssSelector \Exception \ExpressionErrorException ;
15
16
use Symfony \Component \CssSelector \Node \ElementNode ;
16
17
use Symfony \Component \CssSelector \Node \FunctionNode ;
17
18
use Symfony \Component \CssSelector \Parser \Parser ;
@@ -37,23 +38,23 @@ public function testCssToXPath($css, $xpath)
37
38
38
39
public function testCssToXPathPseudoElement ()
39
40
{
40
- $ this ->expectException (\ Symfony \ Component \ CssSelector \ Exception \ ExpressionErrorException::class);
41
+ $ this ->expectException (ExpressionErrorException::class);
41
42
$ translator = new Translator ();
42
43
$ translator ->registerExtension (new HtmlExtension ($ translator ));
43
44
$ translator ->cssToXPath ('e::first-line ' );
44
45
}
45
46
46
47
public function testGetExtensionNotExistsExtension ()
47
48
{
48
- $ this ->expectException (\ Symfony \ Component \ CssSelector \ Exception \ ExpressionErrorException::class);
49
+ $ this ->expectException (ExpressionErrorException::class);
49
50
$ translator = new Translator ();
50
51
$ translator ->registerExtension (new HtmlExtension ($ translator ));
51
52
$ translator ->getExtension ('fake ' );
52
53
}
53
54
54
55
public function testAddCombinationNotExistsExtension ()
55
56
{
56
- $ this ->expectException (\ Symfony \ Component \ CssSelector \ Exception \ ExpressionErrorException::class);
57
+ $ this ->expectException (ExpressionErrorException::class);
57
58
$ translator = new Translator ();
58
59
$ translator ->registerExtension (new HtmlExtension ($ translator ));
59
60
$ parser = new Parser ();
@@ -64,7 +65,7 @@ public function testAddCombinationNotExistsExtension()
64
65
65
66
public function testAddFunctionNotExistsFunction ()
66
67
{
67
- $ this ->expectException (\ Symfony \ Component \ CssSelector \ Exception \ ExpressionErrorException::class);
68
+ $ this ->expectException (ExpressionErrorException::class);
68
69
$ translator = new Translator ();
69
70
$ translator ->registerExtension (new HtmlExtension ($ translator ));
70
71
$ xpath = new XPathExpr ();
@@ -74,7 +75,7 @@ public function testAddFunctionNotExistsFunction()
74
75
75
76
public function testAddPseudoClassNotExistsClass ()
76
77
{
77
- $ this ->expectException (\ Symfony \ Component \ CssSelector \ Exception \ ExpressionErrorException::class);
78
+ $ this ->expectException (ExpressionErrorException::class);
78
79
$ translator = new Translator ();
79
80
$ translator ->registerExtension (new HtmlExtension ($ translator ));
80
81
$ xpath = new XPathExpr ();
@@ -83,7 +84,7 @@ public function testAddPseudoClassNotExistsClass()
83
84
84
85
public function testAddAttributeMatchingClassNotExistsClass ()
85
86
{
86
- $ this ->expectException (\ Symfony \ Component \ CssSelector \ Exception \ ExpressionErrorException::class);
87
+ $ this ->expectException (ExpressionErrorException::class);
87
88
$ translator = new Translator ();
88
89
$ translator ->registerExtension (new HtmlExtension ($ translator ));
89
90
$ xpath = new XPathExpr ();
0 commit comments