You are here

InstantiationTest.php in Zircon Profile 8.0

Same filename and directory in other branches
  1. 8 vendor/behat/mink-goutte-driver/tests/Custom/InstantiationTest.php

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