Skip to content

Commit 995ee52

Browse files
committed
Merge branch '5.1' into 5.2
* 5.1: Use ::class keyword when possible
2 parents d671872 + 1573f9d commit 995ee52

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

AbstractBrowser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function getMaxRedirects()
111111
*/
112112
public function insulate(bool $insulated = true)
113113
{
114-
if ($insulated && !class_exists('Symfony\\Component\\Process\\Process')) {
114+
if ($insulated && !class_exists(\Symfony\Component\Process\Process::class)) {
115115
throw new \LogicException('Unable to isolate requests as the Symfony Process Component is not installed.');
116116
}
117117

@@ -503,7 +503,7 @@ protected function filterResponse($response)
503503
*/
504504
protected function createCrawlerFromContent(string $uri, string $content, string $type)
505505
{
506-
if (!class_exists('Symfony\Component\DomCrawler\Crawler')) {
506+
if (!class_exists(Crawler::class)) {
507507
return null;
508508
}
509509

Tests/AbstractBrowserTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function testGetRequest()
4545

4646
public function testGetRequestNull()
4747
{
48-
$this->expectException('Symfony\Component\BrowserKit\Exception\BadMethodCallException');
48+
$this->expectException(\Symfony\Component\BrowserKit\Exception\BadMethodCallException::class);
4949
$this->expectExceptionMessage('The "request()" method must be called before "Symfony\\Component\\BrowserKit\\AbstractBrowser::getRequest()".');
5050

5151
$client = $this->getBrowser();
@@ -82,7 +82,7 @@ public function testGetResponse()
8282

8383
public function testGetResponseNull()
8484
{
85-
$this->expectException('Symfony\Component\BrowserKit\Exception\BadMethodCallException');
85+
$this->expectException(\Symfony\Component\BrowserKit\Exception\BadMethodCallException::class);
8686
$this->expectExceptionMessage('The "request()" method must be called before "Symfony\\Component\\BrowserKit\\AbstractBrowser::getResponse()".');
8787

8888
$client = $this->getBrowser();
@@ -91,7 +91,7 @@ public function testGetResponseNull()
9191

9292
public function testGetInternalResponseNull()
9393
{
94-
$this->expectException('Symfony\Component\BrowserKit\Exception\BadMethodCallException');
94+
$this->expectException(\Symfony\Component\BrowserKit\Exception\BadMethodCallException::class);
9595
$this->expectExceptionMessage('The "request()" method must be called before "Symfony\\Component\\BrowserKit\\AbstractBrowser::getInternalResponse()".');
9696

9797
$client = $this->getBrowser();
@@ -118,7 +118,7 @@ public function testGetCrawler()
118118

119119
public function testGetCrawlerNull()
120120
{
121-
$this->expectException('Symfony\Component\BrowserKit\Exception\BadMethodCallException');
121+
$this->expectException(\Symfony\Component\BrowserKit\Exception\BadMethodCallException::class);
122122
$this->expectExceptionMessage('The "request()" method must be called before "Symfony\\Component\\BrowserKit\\AbstractBrowser::getCrawler()".');
123123

124124
$client = $this->getBrowser();
@@ -831,7 +831,7 @@ public function testInternalRequest()
831831

832832
public function testInternalRequestNull()
833833
{
834-
$this->expectException('Symfony\Component\BrowserKit\Exception\BadMethodCallException');
834+
$this->expectException(\Symfony\Component\BrowserKit\Exception\BadMethodCallException::class);
835835
$this->expectExceptionMessage('The "request()" method must be called before "Symfony\\Component\\BrowserKit\\AbstractBrowser::getInternalRequest()".');
836836

837837
$client = $this->getBrowser();

0 commit comments

Comments
 (0)