ViewsIntegrationTest.php in Commerce Core 8.2
File
modules/payment/tests/src/Kernel/ViewsIntegrationTest.php
View source
<?php
namespace Drupal\Tests\commerce_payment\Kernel;
use Drupal\Tests\commerce_order\Kernel\OrderKernelTestBase;
use Drupal\views\Views;
class ViewsIntegrationTest extends OrderKernelTestBase {
public static $modules = [
'address',
'entity_reference_revisions',
'profile',
'state_machine',
'commerce_product',
'commerce_order',
'commerce_payment',
'commerce_payment_example',
'commerce_payment_test',
];
protected function setUp() : void {
parent::setUp();
$this
->installEntitySchema('commerce_payment');
$this
->installEntitySchema('commerce_payment_method');
$this
->installConfig('commerce_payment');
$this
->installConfig('commerce_payment_test');
}
public function testFilterPluginDependenciesDontExplode() {
$view = Views::getView('payment_methods');
$view
->save();
$dependencies = $view->displayHandlers
->get('default')
->calculateDependencies();
$this
->assertEquals([
'module' => [
'commerce',
'commerce_payment',
'views',
],
], $dependencies);
}
}