PluginTypeListTest.php 831 Bytes
Newer Older
1 2
<?php

3
namespace Drupal\Tests\views\Unit;
4 5

use Drupal\views\ViewExecutable;
6
use Drupal\Tests\UnitTestCase;
7 8

/**
9 10 11
 * Tests that list of plugin is correct.
 *
 * @group views
12
 */
13
class PluginTypeListTest extends UnitTestCase {
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45

  /**
   * Tests the plugins list is correct.
   */
  public function testPluginList() {
    $plugin_list = array(
      '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');
  }

}