-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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'); | ||
} | ||
|
||
} |