You are here

class InstantiationTest in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink-goutte-driver/tests/Custom/InstantiationTest.php \Behat\Mink\Tests\Driver\Custom\InstantiationTest

Hierarchy

  • class \Behat\Mink\Tests\Driver\Custom\InstantiationTest extends \Behat\Mink\Tests\Driver\Custom\PHPUnit_Framework_TestCase

Expanded class hierarchy of InstantiationTest

File

vendor/behat/mink-goutte-driver/tests/Custom/InstantiationTest.php, line 7

Namespace

Behat\Mink\Tests\Driver\Custom
View source
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());
  }

}

Members