This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
drupalcampbristol/vendor/behat/mink-goutte-driver/tests/Custom/InstantiationTest.php

28 lines
714 B
PHP

<?php
namespace Behat\Mink\Tests\Driver\Custom;
use Behat\Mink\Driver\GoutteDriver;
class InstantiationTest extends \PHPUnit_Framework_TestCase
{
public function testInstantiateWithClient()
{
$client = $this->getMockBuilder('Goutte\Client')->disableOriginalConstructor()->getMock();
$client->expects($this->once())
->method('followRedirects')
->with(true);
$driver = new GoutteDriver($client);
$this->assertSame($client, $driver->getClient());
}
public function testInstantiateWithoutClient()
{
$driver = new GoutteDriver();
$this->assertInstanceOf('Behat\Mink\Driver\Goutte\Client', $driver->getClient());
}
}