-
Notifications
You must be signed in to change notification settings - Fork 0
/
SimplelistTest.php
75 lines (64 loc) · 1.5 KB
/
SimplelistTest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?php
namespace Drupal\Tests\simplelist\Functional;
use Drupal\Tests\BrowserTestBase;
/**
* Tests the Configuration Simplelist module.
*
* @group simplelist
*/
class SimplelistTest extends BrowserTestBase {
/**
* A user with permission to administer feeds and create content.
*
* @var \Drupal\user\Entity\User
*/
protected $adminUser;
/**
* {@inheritdoc}
*/
protected $profile = 'standard';
/**
* {@inheritdoc}
*
* Remove after
* https://www.drupal.org/project/entityqueue/issues/2933989 is fixed.
*/
protected $strictConfigSchema = FALSE;
/**
* Modules to install.
*
* @var array
*/
public static $modules = [
'views',
'entityqueue',
'default_content',
'simplelist',
];
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->adminUser = $this->drupalCreateUser([
'access administration pages',
'access simplelist',
'administer simplelist',
'manipulate all entityqueues',
]);
$this->drupalPlaceBlock('local_tasks_block');
$this->drupalPlaceBlock('local_actions_block');
$this->drupalLogin($this->adminUser);
}
/**
* Tests default functionality.
*/
public function testSimplelist() {
$session = $this->assertSession();
// Make sure entity queue exist.
$this->drupalGet('/admin/structure/entityqueue');
$session->pageTextContains('FAQ');
$this->drupalGet('/faq');
$session->pageTextContains('Frequently Asked Questions');
}
}