Try to run tests with Behat @ dev-master
This commit is contained in:
@@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
namespace FriendsOfBehat\SymfonyExtension\Driver;
|
||||
|
||||
use Behat\Mink\Driver\BrowserKitDriver;
|
||||
use Symfony\Component\BrowserKit\AbstractBrowser;
|
||||
use Symfony\Component\BrowserKit\Client;
|
||||
use Symfony\Component\HttpKernel\KernelInterface;
|
||||
|
||||
@@ -25,10 +26,11 @@ final class SymfonyDriver extends BrowserKitDriver
|
||||
/** @var object $testClient */
|
||||
$testClient = $kernel->getContainer()->get('test.client');
|
||||
|
||||
if (!$testClient instanceof Client) {
|
||||
if (!$testClient instanceof Client && !$testClient instanceof AbstractBrowser) {
|
||||
throw new \RuntimeException(sprintf(
|
||||
'Service "test.client" should be an instance of "%s", "%s" given.',
|
||||
'Service "test.client" should be an instance of "%s" or "%s", "%s" given.',
|
||||
Client::class,
|
||||
AbstractBrowser::class,
|
||||
get_class($testClient)
|
||||
));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user