public function ImportAccessTest::testPopulateForm in Bibliography & Citation 8
Same name and namespace in other branches
- 2.0.x modules/bibcite_import/tests/src/Functional/ImportAccessTest.php \Drupal\Tests\bibcite_import\Functional\ImportAccessTest::testPopulateForm()
Test Populate form.
File
- modules/
bibcite_import/ tests/ src/ Functional/ ImportAccessTest.php, line 84
Class
- ImportAccessTest
- Test access to import form.
Namespace
Drupal\Tests\bibcite_import\FunctionalCode
public function testPopulateForm() {
$this
->drupalLogin($this->user);
$this
->drupalGet('admin/content/bibcite/reference/populate');
$this
->assertSession()
->statusCodeEquals(200);
$simple_user = $this
->drupalCreateUser([
'create bibcite_reference',
'edit own bibcite_reference',
'edit any bibcite_reference',
'view bibcite_reference',
]);
$this
->drupalLogin($simple_user);
$this
->drupalGet('admin/content/bibcite/reference/populate');
$this
->assertSession()
->statusCodeEquals(403);
$user_populate = $this
->drupalCreateUser([
'create bibcite_reference',
'edit own bibcite_reference',
'edit any bibcite_reference',
'view bibcite_reference',
'bibcite populate',
]);
$this
->drupalLogin($user_populate);
$this
->drupalGet('admin/content/bibcite/reference/populate');
$this
->assertSession()
->statusCodeEquals(200);
}