public function DomainAccessAllAffiliatesTest::testDomainAccessAllField in Domain Access 8
Tests that the module installed its field correctly.
File
- domain_access/
tests/ src/ Functional/ DomainAccessAllAffiliatesTest.php, line 25
Class
- DomainAccessAllAffiliatesTest
- Tests the domain access entity reference field type.
Namespace
Drupal\Tests\domain_access\FunctionalCode
public function testDomainAccessAllField() {
$label = 'Send to all affiliates';
$this->admin_user = $this
->drupalCreateUser([
'administer content types',
'administer node fields',
'administer node display',
'administer domains',
]);
$this
->drupalLogin($this->admin_user);
// Visit the article field administration page.
$this
->drupalGet('admin/structure/types/manage/article/fields');
$this
->assertResponse(200, 'Manage fields page accessed.');
// Check for the field.
$this
->assertText($label, 'Domain form field found.');
// Visit the article field display administration page.
$this
->drupalGet('admin/structure/types/manage/article/display');
$this
->assertResponse(200, 'Manage field display page accessed.');
// Check for the field.
$this
->assertText($label, 'Domain form field found.');
}