drupal-behat
drupal-behat copied to clipboard
Fixes PHP TypeError when asserting for a non-visible field
When asserting for a non-visible field, there is a type error:
Type error: NuvoleWeb\Drupal\DrupalExtension\Context\VisibilityContext::assertElementNotVisible(): Argument #2 ($node) must be of type Behat\Mink\Element\NodeElement, null given, called in vendor/nuvoleweb/drupal-behat/src/DrupalExtension/Context/VisibilityContext.php on line 64
Ironically, this TypeError indicates success—the element could not be found so the argument is null. But the TypeError causes the tests to fail. This PR adjusts the type arguments to allow NULL
.