Skip to content

[FrameworkBundle] Rename Symfony\Bundle\FrameworkBundle\Test\WebTestCase to AbstractWeb… #32618

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
* @author Fabien Potencier <fabien@symfony.com>
*/
abstract class WebTestCase extends KernelTestCase
abstract class AbstractWebTestCase extends KernelTestCase
{
use WebTestAssertionsTrait;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
use Symfony\Bundle\FrameworkBundle\Test\AbstractWebTestCase as BaseWebTestCase;
use Symfony\Component\Filesystem\Filesystem;

class WebTestCase extends BaseWebTestCase
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use PHPUnit\Framework\TestCase;
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
use Symfony\Bundle\FrameworkBundle\Test\WebTestAssertionsTrait;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Bundle\FrameworkBundle\Test\AbstractWebTestCase;
use Symfony\Component\BrowserKit\Cookie;
use Symfony\Component\BrowserKit\CookieJar;
use Symfony\Component\DomCrawler\Crawler;
Expand Down Expand Up @@ -235,23 +235,23 @@ public function testAssertRouteSame()
$this->getRequestTester()->assertRouteSame('articles');
}

private function getResponseTester(Response $response): WebTestCase
private function getResponseTester(Response $response): AbstractWebTestCase
{
$client = $this->createMock(KernelBrowser::class);
$client->expects($this->any())->method('getResponse')->willReturn($response);

return $this->getTester($client);
}

private function getCrawlerTester(Crawler $crawler): WebTestCase
private function getCrawlerTester(Crawler $crawler): AbstractWebTestCase
{
$client = $this->createMock(KernelBrowser::class);
$client->expects($this->any())->method('getCrawler')->willReturn($crawler);

return $this->getTester($client);
}

private function getClientTester(): WebTestCase
private function getClientTester(): AbstractWebTestCase
{
$client = $this->createMock(KernelBrowser::class);
$jar = new CookieJar();
Expand All @@ -261,7 +261,7 @@ private function getClientTester(): WebTestCase
return $this->getTester($client);
}

private function getRequestTester(): WebTestCase
private function getRequestTester(): AbstractWebTestCase
{
$client = $this->createMock(KernelBrowser::class);
$request = new Request();
Expand All @@ -272,9 +272,9 @@ private function getRequestTester(): WebTestCase
return $this->getTester($client);
}

private function getTester(KernelBrowser $client): WebTestCase
private function getTester(KernelBrowser $client): AbstractWebTestCase
{
return new class($client) extends WebTestCase {
return new class($client) extends AbstractWebTestCase {
use WebTestAssertionsTrait;

public function __construct(KernelBrowser $client)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Symfony\Bundle\SecurityBundle\Tests\Functional;

use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
use Symfony\Bundle\FrameworkBundle\Test\AbstractWebTestCase as BaseWebTestCase;
use Symfony\Component\Filesystem\Filesystem;

class WebTestCase extends BaseWebTestCase
Expand Down