public function DomainAccessEntityReferenceTest::testDomainAccessNodeField in Domain Access 8
Tests that the module installed its field correctly.
File
- domain_access/
tests/ src/ Functional/ DomainAccessEntityReferenceTest.php, line 24
Class
- DomainAccessEntityReferenceTest
- Tests the domain access entity reference field type.
Namespace
Drupal\Tests\domain_access\FunctionalCode
public function testDomainAccessNodeField() {
$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 a domain field.
$this
->assertText('Domain Access', '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 a domain field.
$this
->assertText('Domain Access', 'Domain form field found.');
}