Skip to content

Commit bc0a4e1

Browse files
committed
Merge branch '5.2' into 5.x
* 5.2: Use ::class keyword when possible
2 parents 946c361 + 995ee52 commit bc0a4e1

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

@@ -521,7 +521,7 @@ protected function filterResponse($response)
521521
*/
522522
protected function createCrawlerFromContent(string $uri, string $content, string $type)
523523
{
524-
if (!class_exists('Symfony\Component\DomCrawler\Crawler')) {
524+
if (!class_exists(Crawler::class)) {
525525
return null;
526526
}
527527

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();
@@ -93,7 +93,7 @@ public function testGetResponse()
9393

9494
public function testGetResponseNull()
9595
{
96-
$this->expectException('Symfony\Component\BrowserKit\Exception\BadMethodCallException');
96+
$this->expectException(\Symfony\Component\BrowserKit\Exception\BadMethodCallException::class);
9797
$this->expectExceptionMessage('The "request()" method must be called before "Symfony\\Component\\BrowserKit\\AbstractBrowser::getResponse()".');
9898

9999
$client = $this->getBrowser();
@@ -102,7 +102,7 @@ public function testGetResponseNull()
102102

103103
public function testGetInternalResponseNull()
104104
{
105-
$this->expectException('Symfony\Component\BrowserKit\Exception\BadMethodCallException');
105+
$this->expectException(\Symfony\Component\BrowserKit\Exception\BadMethodCallException::class);
106106
$this->expectExceptionMessage('The "request()" method must be called before "Symfony\\Component\\BrowserKit\\AbstractBrowser::getInternalResponse()".');
107107

108108
$client = $this->getBrowser();
@@ -129,7 +129,7 @@ public function testGetCrawler()
129129

130130
public function testGetCrawlerNull()
131131
{
132-
$this->expectException('Symfony\Component\BrowserKit\Exception\BadMethodCallException');
132+
$this->expectException(\Symfony\Component\BrowserKit\Exception\BadMethodCallException::class);
133133
$this->expectExceptionMessage('The "request()" method must be called before "Symfony\\Component\\BrowserKit\\AbstractBrowser::getCrawler()".');
134134

135135
$client = $this->getBrowser();
@@ -842,7 +842,7 @@ public function testInternalRequest()
842842

843843
public function testInternalRequestNull()
844844
{
845-
$this->expectException('Symfony\Component\BrowserKit\Exception\BadMethodCallException');
845+
$this->expectException(\Symfony\Component\BrowserKit\Exception\BadMethodCallException::class);
846846
$this->expectExceptionMessage('The "request()" method must be called before "Symfony\\Component\\BrowserKit\\AbstractBrowser::getInternalRequest()".');
847847

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

0 commit comments

Comments
 (0)