Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 368-375 (lines=8) @@
365
   * @return object
366
   *   The created node.
367
   */
368
  public function nodeCreate($node) {
369
    $this->dispatchHooks('BeforeNodeCreateScope', $node);
370
    $this->parseEntityFields('node', $node);
371
    $saved = $this->getDriver()->createNode($node);
372
    $this->dispatchHooks('AfterNodeCreateScope', $saved);
373
    $this->nodes[] = $saved;
374
    return $saved;
375
  }
376
377
  /**
378
   * Parse multi-value fields. Possible formats:
@@ 485-492 (lines=8) @@
482
   * @return object
483
   *   The created term.
484
   */
485
  public function termCreate($term) {
486
    $this->dispatchHooks('BeforeTermCreateScope', $term);
487
    $this->parseEntityFields('taxonomy_term', $term);
488
    $saved = $this->getDriver()->createTerm($term);
489
    $this->dispatchHooks('AfterTermCreateScope', $saved);
490
    $this->terms[] = $saved;
491
    return $saved;
492
  }
493
494
  /**
495
   * Creates a language.