getEnvironment(); $this->drupalContext = $environment->getContext('Drupal\DrupalExtension\Context\DrupalContext'); $this->minkContext = $environment->getContext('Drupal\DrupalExtension\Context\MinkContext'); } /** * @Given I create a(an) :arg1 content type */ public function CreateAContentType($arg1) { $this->minkContext->assertAtPath("admin/structure/types/add"); $node = [ 'title' => 'Test content!', ]; $this->drupalContext->nodeCreate($node); } /** * @Then /^I should have a subcontext definition$/ */ public function assertSubContextDefinition() { throw new PendingException(); } }