for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Zenstruck\Browser\Test;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
use Symfony\Component\BrowserKit\HttpBrowser as HttpBrowserClient;
use Symfony\Component\Panther\Client as PantherClient;
use Symfony\Component\Panther\PantherTestCase;
use Zenstruck\Browser\HttpBrowser;
use Zenstruck\Browser\KernelBrowser;
use Zenstruck\Browser\PantherBrowser;
/**
* @author Kevin Bond <[email protected]>
*/
trait HasBrowser
{
use HasKernelBrowser, HasHttpBrowser, HasPantherBrowser {
HasKernelBrowser::browser insteadof HasHttpBrowser;
HasKernelBrowser::browser as kernelBrowser;
HasHttpBrowser::browser as httpBrowser;
HasPantherBrowser::browser as pantherBrowser;
}
protected function browser(): void
throw new \BadMethodCallException(sprintf('"%s" cannot be used when using the "HasBrowser" trait, use any of "kernelBrowser()", "httpBrowser()" or "pantherBrowser()" instead.', __METHOD__));