CartDependencyTest.php in Commerce Core 8.2
File
modules/promotion/tests/src/Functional/CartDependencyTest.php
View source
<?php
namespace Drupal\Tests\commerce_promotion\Functional;
use Drupal\Tests\commerce\Functional\CommerceBrowserTestBase;
class CartDependencyTest extends CommerceBrowserTestBase {
public static $modules = [
'commerce_order',
];
protected function getAdministratorPermissions() {
return array_merge([
'access administration pages',
'administer modules',
], parent::getAdministratorPermissions());
}
public function testDidNotCrash() {
$edit = [];
$edit['modules[commerce_promotion][enable]'] = TRUE;
$this
->drupalGet('admin/modules');
$this
->submitForm($edit, 'Install');
$this
->assertText('Module Commerce Promotion has been enabled.');
}
}