Code Duplication    Length = 8-8 lines in 2 locations

src/Drupal/DrupalExtension/Context/RawDrupalContext.php 2 locations

@@ 336-343 (lines=8) @@
333
   * @return object
334
   *   The created node.
335
   */
336
  public function nodeCreate($node) {
337
    $this->dispatchHooks('BeforeNodeCreateScope', $node);
338
    $this->parseEntityFields('node', $node);
339
    $saved = $this->getDriver()->createNode($node);
340
    $this->dispatchHooks('AfterNodeCreateScope', $saved);
341
    $this->nodes[] = $saved;
342
    return $saved;
343
  }
344
345
  /**
346
   * Parses the field values and turns them into the format expected by Drupal.
@@ 473-480 (lines=8) @@
470
   * @return object
471
   *   The created term.
472
   */
473
  public function termCreate($term) {
474
    $this->dispatchHooks('BeforeTermCreateScope', $term);
475
    $this->parseEntityFields('taxonomy_term', $term);
476
    $saved = $this->getDriver()->createTerm($term);
477
    $this->dispatchHooks('AfterTermCreateScope', $saved);
478
    $this->terms[] = $saved;
479
    return $saved;
480
  }
481
482
  /**
483
   * Creates a language.