You are here

public function ViewsIntegrationTest::testFilterPluginDependenciesDontExplode in Commerce Core 8.2

Tests the filter plugin dependencies.

File

modules/payment/tests/src/Kernel/ViewsIntegrationTest.php, line 49

Class

ViewsIntegrationTest
Tests that a view can be made of payment methods.

Namespace

Drupal\Tests\commerce_payment\Kernel

Code

public function testFilterPluginDependenciesDontExplode() {
  $view = Views::getView('payment_methods');

  // This will cause an exception if the fix is not implemented in
  // \Drupal\commerce\Plugin\views\filter\EntityBundle::calculateDependencies.
  $view
    ->save();

  // Verify the module dependencies are still respected.
  $dependencies = $view->displayHandlers
    ->get('default')
    ->calculateDependencies();
  $this
    ->assertEquals([
    'module' => [
      'commerce',
      'commerce_payment',
      'views',
    ],
  ], $dependencies);
}