Version 1
[yaffs-website] / web / core / modules / views / tests / src / Unit / PluginTypeListTest.php
diff --git a/web/core/modules/views/tests/src/Unit/PluginTypeListTest.php b/web/core/modules/views/tests/src/Unit/PluginTypeListTest.php
new file mode 100644 (file)
index 0000000..29da6b3
--- /dev/null
@@ -0,0 +1,45 @@
+<?php
+
+namespace Drupal\Tests\views\Unit;
+
+use Drupal\views\ViewExecutable;
+use Drupal\Tests\UnitTestCase;
+
+/**
+ * Tests that list of plugin is correct.
+ *
+ * @group views
+ */
+class PluginTypeListTest extends UnitTestCase {
+
+  /**
+   * Tests the plugins list is correct.
+   */
+  public function testPluginList() {
+    $plugin_list = [
+      'access',
+      'area',
+      'argument',
+      'argument_default',
+      'argument_validator',
+      'cache',
+      'display_extender',
+      'display',
+      'exposed_form',
+      'field',
+      'filter',
+      'join',
+      'pager',
+      'query',
+      'relationship',
+      'row',
+      'sort',
+      'style',
+      'wizard',
+    ];
+
+    $diff = array_diff($plugin_list, ViewExecutable::getPluginTypes());
+    $this->assertTrue(empty($diff), 'The plugin list is correct');
+  }
+
+}