I am trying to run the following behat step:
@Given I am logged in as a user with the :role role(s) and I have the following fields:
This is defined in DrupalContext.php on lines 68-106. I have a standard behat install from composer. When I run this, I get the following error:
--- FeatureContext has missing steps. Define them with these snippets:
/** * @Given I am logged in as a user with the :arg1 and I have the following fields: */ public function iAmLoggedInAsAUserWithTheAndIHaveTheFollowingFields($arg1, TableNode $table) { throw new PendingException(); }
I am still pretty new to OOPHP so when I read this I took it to mean that it couldn't find the original method. I added a use statement in my feature/bootstrap/FeatureContext.php:
use Drupal\DrupalExtension\Context\assertAuthenticatedByRole;
But I still get the same results. Here is my implementation of the behat scenario:
@api
Scenario: An administrator should not be able to create a page content
Given I am logged in as a user with the 'administrator' and I have the
following fields:
| field_user_username | drupaltest |
iAmLoggedInAsAUserWithTheAndIHaveTheFollowingFields()
role(s)
text afteradministrator
?