You are here

public function CoreDriverTest::testInterfaceMethods in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/behat/mink/tests/Driver/CoreDriverTest.php \Behat\Mink\Tests\Driver\CoreDriverTest::testInterfaceMethods()

@dataProvider getDriverInterfaceMethods

File

vendor/behat/mink/tests/Driver/CoreDriverTest.php, line 53

Class

CoreDriverTest

Namespace

Behat\Mink\Tests\Driver

Code

public function testInterfaceMethods(\ReflectionMethod $method) {
  $refl = new \ReflectionClass('Behat\\Mink\\Driver\\CoreDriver');
  $this
    ->assertFalse($refl
    ->getMethod($method
    ->getName())
    ->isAbstract(), sprintf('CoreDriver should implement a dummy %s method', $method
    ->getName()));
  if ('setSession' === $method
    ->getName()) {
    return;

    // setSession is actually implemented, so we don't expect an exception here.
  }
  $driver = $this
    ->getMockForAbstractClass('Behat\\Mink\\Driver\\CoreDriver');
  $this
    ->setExpectedException('Behat\\Mink\\Exception\\UnsupportedDriverActionException');
  call_user_func_array(array(
    $driver,
    $method
      ->getName(),
  ), $this
    ->getArguments($method));
}