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