Version 1
[yaffs-website] / web / modules / contrib / diff / src / Tests / DiffPluginTestBase.php
diff --git a/web/modules/contrib/diff/src/Tests/DiffPluginTestBase.php b/web/modules/contrib/diff/src/Tests/DiffPluginTestBase.php
new file mode 100644 (file)
index 0000000..1f84fa8
--- /dev/null
@@ -0,0 +1,49 @@
+<?php
+
+namespace Drupal\diff\Tests;
+
+/**
+ * Tests the Diff module plugins.
+ *
+ * @ingroup diff
+ */
+abstract class DiffPluginTestBase extends DiffTestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = [
+    'diff_test',
+    'link',
+    'options',
+  ];
+
+  /**
+   * A storage instance for the entity form display.
+   *
+   * @var \Drupal\Core\Entity\Display\EntityFormDisplayInterface
+   */
+  protected $formDisplay;
+
+  /**
+   * A storage instance for the entity view display.
+   *
+   * @var \Drupal\Core\Entity\Display\EntityViewDisplayInterface
+   */
+  protected $viewDisplay;
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setUp() {
+    parent::setUp();
+
+    $this->formDisplay = \Drupal::entityTypeManager()->getStorage('entity_form_display');
+    $this->viewDisplay = \Drupal::entityTypeManager()->getStorage('entity_view_display');
+
+    $this->drupalLogin($this->rootUser);
+  }
+
+}