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:
@@ 481-488 (lines=8) @@
478
   * @return object
479
   *   The created term.
480
   */
481
  public function termCreate($term) {
482
    $this->dispatchHooks('BeforeTermCreateScope', $term);
483
    $this->parseEntityFields('taxonomy_term', $term);
484
    $saved = $this->getDriver()->createTerm($term);
485
    $this->dispatchHooks('AfterTermCreateScope', $saved);
486
    $this->terms[] = $saved;
487
    return $saved;
488
  }
489
490
  /**
491
   * Creates a language.