3 namespace Behat\Mink\Tests\Driver\Custom;
5 use Behat\Mink\Driver\GoutteDriver;
7 class InstantiationTest extends \PHPUnit_Framework_TestCase
9 public function testInstantiateWithClient()
11 $client = $this->getMockBuilder('Goutte\Client')->disableOriginalConstructor()->getMock();
12 $client->expects($this->once())
13 ->method('followRedirects')
16 $driver = new GoutteDriver($client);
18 $this->assertSame($client, $driver->getClient());
21 public function testInstantiateWithoutClient()
23 $driver = new GoutteDriver();
25 $this->assertInstanceOf('Behat\Mink\Driver\Goutte\Client', $driver->getClient());