Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 356-363 (lines=8) @@
353
   * @return object
354
   *   The created node.
355
   */
356
    public function nodeCreate($node)
357
    {
358
        $this->dispatchHooks('BeforeNodeCreateScope', $node);
359
        $this->parseEntityFields('node', $node);
360
        $saved = $this->getDriver()->createNode($node);
361
        $this->dispatchHooks('AfterNodeCreateScope', $saved);
362
        $this->nodes[] = $saved;
363
        return $saved;
364
    }
365
366
  /**
@@ 491-498 (lines=8) @@
488
   * @return object
489
   *   The created term.
490
   */
491
    public function termCreate($term)
492
    {
493
        $this->dispatchHooks('BeforeTermCreateScope', $term);
494
        $this->parseEntityFields('taxonomy_term', $term);
495
        $saved = $this->getDriver()->createTerm($term);
496
        $this->dispatchHooks('AfterTermCreateScope', $saved);
497
        $this->terms[] = $saved;
498
        return $saved;
499
    }
500
501
  /**