Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 336-343 (lines=8) @@
333
   * @return object
334
   *   The created node.
335
   */
336
  public function nodeCreate($node) {
337
    $this->dispatchHooks('BeforeNodeCreateScope', $node);
338
    $this->parseEntityFields('node', $node);
339
    $saved = $this->getDriver()->createNode($node);
340
    $this->dispatchHooks('AfterNodeCreateScope', $saved);
341
    $this->nodes[] = $saved;
342
    return $saved;
343
  }
344
345
  /**
346
   * Parse multi-value fields. Possible formats:
@@ 444-451 (lines=8) @@
441
   * @return object
442
   *   The created term.
443
   */
444
  public function termCreate($term) {
445
    $this->dispatchHooks('BeforeTermCreateScope', $term);
446
    $this->parseEntityFields('taxonomy_term', $term);
447
    $saved = $this->getDriver()->createTerm($term);
448
    $this->dispatchHooks('AfterTermCreateScope', $saved);
449
    $this->terms[] = $saved;
450
    return $saved;
451
  }
452
453
  /**
454
   * Creates a language.