src/DrupalExtension/Context/ContentContext.php
public function assertContent(PyStringNode $string) {
    $values = $this->getYamlParser()->parse($string);
    $message = __METHOD__ . ": Required fields 'type', 'title' and 'langcode' not found.";
    Assert::keyExists($values, 'type', $message);
    Assert::keyExists($values, 'title', $message);
    Assert::keyExists($values, 'langcode', $message);
    $node = $this->getCore()->entityCreate('node', $values);
    $this->nodes[] = $node;
  }
public function assertContent(PyStringNode $string) {
    $values = $this->getYamlParser()->parse($string);
    $message = __METHOD__ . ": Required fields 'type', 'title' and 'langcode' not found.";
    Assert::keyExists($values, 'type', $message);
    Assert::keyExists($values, 'title', $message);
    Assert::keyExists($values, 'langcode', $message);
    $node = $this->getCore()->entityCreate('node', $values);
    $this->nodes[] = $node;
  }
public function assertContent ( PyStringNode $ string ) { $ values = $ this -> getYamlParser ( ) -> parse ( $ string ) ; $ message = __METHOD__ . ": Required fields 'type', 'title' and 'langcode' not found." ; Assert :: keyExists ( $ values , 'type' , $ message ) ; Assert :: keyExists ( $ values , 'title' , $ message ) ; Assert :: keyExists ( $ values , 'langcode' , $ message ) ; $ node = $ this -> getCore ( ) -> entityCreate ( 'node' , $ values ) ; $ this -> nodes [ ] = $ node ; }
Create content defined in YAML format.

@param \Behat\Gherkin\Node\PyStringNode $string
The text in yaml format that represents the content.

@Given the following content:
Create content defined in YAML format .