You are here

private function BestPracticesTest::assertNotImplementMethod in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/behat/mink/driver-testsuite/tests/Basic/BestPracticesTest.php \Behat\Mink\Tests\Driver\Basic\BestPracticesTest::assertNotImplementMethod()
1 call to BestPracticesTest::assertNotImplementMethod()
BestPracticesTest::testImplementFindXpath in vendor/behat/mink/driver-testsuite/tests/Basic/BestPracticesTest.php
@depends testExtendsCoreDriver

File

vendor/behat/mink/driver-testsuite/tests/Basic/BestPracticesTest.php, line 71

Class

BestPracticesTest
This testcase ensures that the driver implementation follows recommended practices for drivers.

Namespace

Behat\Mink\Tests\Driver\Basic

Code

private function assertNotImplementMethod($method, $object, $reason = '') {
  $ref = new \ReflectionClass(get_class($object));
  $refMethod = $ref
    ->getMethod($method);
  $message = sprintf('The driver should not implement the `%s` method.', $method);
  if ('' !== $reason) {
    $message .= ' ' . $reason;
  }
  $this
    ->assertNotSame($ref->name, $refMethod
    ->getDeclaringClass()->name, $message);
}