You are here

InstantiationTest.php in Zircon Profile 8

File

vendor/behat/mink-goutte-driver/tests/Custom/InstantiationTest.php
View source
<?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());
  }

}

Classes

Namesort descending Description
InstantiationTest