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
   * Parses the field values and turns them into the format expected by Drupal.
@@ 505-512 (lines=8) @@
502
   * @return object
503
   *   The created term.
504
   */
505
  public function termCreate($term) {
506
    $this->dispatchHooks('BeforeTermCreateScope', $term);
507
    $this->parseEntityFields('taxonomy_term', $term);
508
    $saved = $this->getDriver()->createTerm($term);
509
    $this->dispatchHooks('AfterTermCreateScope', $saved);
510
    $this->terms[] = $saved;
511
    return $saved;
512
  }
513
514
  /**
515
   * Creates a language.