Code Duplication    Length = 8-8 lines in 2 locations

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

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