123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- namespace Behat\Mink\Tests\Driver;
- use Behat\Mink\Driver\BrowserKitDriver;
- use Behat\Mink\Tests\Driver\Util\FixturesKernel;
- use Symfony\Component\HttpKernel\Client;
- class BrowserKitConfig extends AbstractConfig
- {
- public static function getInstance()
- {
- return new self();
- }
- /**
- * {@inheritdoc}
- */
- public function createDriver()
- {
- $client = new Client(new FixturesKernel());
- return new BrowserKitDriver($client);
- }
- /**
- * {@inheritdoc}
- */
- public function getWebFixturesUrl()
- {
- return 'http://localhost';
- }
- protected function supportsJs()
- {
- return false;
- }
- public function skipMessage($testCase, $test)
- {
- if (
- 'Behat\Mink\Tests\Driver\Form\Html5Test' === $testCase
- && in_array($test, array(
- 'testHtml5FormAction',
- 'testHtml5FormMethod',
- ))
- && !method_exists('Symfony\Component\DomCrawler\Tests\FormTest', 'testGetMethodWithOverride')
- ) {
- return 'Mink BrowserKit doesn\'t support HTML5 form attributes before Symfony 3.3';
- }
- return parent::skipMessage($testCase, $test);
- }
- }
|