comparison core/modules/views/tests/src/Functional/UserBatchActionTest.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents
children
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
1 <?php
2
3 namespace Drupal\Tests\views\Functional;
4
5 use Drupal\Tests\BrowserTestBase;
6
7 /**
8 * Tests the views bulk form with batch action.
9 *
10 * @group action
11 * @see \Drupal\action\Plugin\views\field\BulkForm
12 */
13 class UserBatchActionTest extends BrowserTestBase {
14
15 /**
16 * Modules to install.
17 *
18 * @var array
19 */
20 public static $modules = ['user', 'user_batch_action_test', 'views'];
21
22 /**
23 * Tests user admin batch.
24 */
25 public function testUserAction() {
26 $themes = ['classy', 'seven', 'bartik', 'test_subseven'];
27 $this->container->get('theme_installer')->install($themes);
28
29 $this->drupalLogin($this->rootUser);
30
31 foreach ($themes as $theme) {
32 $this->config('system.theme')->set('default', $theme)->save();
33 $this->drupalGet('admin/people');
34 $edit = [
35 'user_bulk_form[0]' => TRUE,
36 'action' => 'user_batch_action_test_action',
37 ];
38 $this->drupalPostForm(NULL, $edit, t('Apply'));
39 $this->assertSession()->pageTextContains('One item has been processed.');
40 $this->assertSession()->pageTextContains($theme . ' theme used');
41 }
42 }
43
44 }