DomainContentCountTest.php in Domain Access 8
File
domain_content/tests/src/Functional/DomainContentCountTest.php
View source
<?php
namespace Drupal\Tests\domain_content\Functional;
class DomainContentCountTest extends DomainContentTestBase {
public function testDomainContentCount() {
$this->admin_user = $this
->drupalCreateUser([
'administer domains',
'access administration pages',
'access domain content',
'access domain content editors',
'publish to any domain',
'assign editors to any domain',
]);
$this
->drupalLogin($this->admin_user);
$this
->createDomainContent();
$this
->createDomainUsers();
$urls = [
'admin/content/domain-content',
'admin/content/domain-editors',
];
foreach ($urls as $url) {
$content = $this
->drupalGet($url);
$this
->assertResponse(200);
$this
->findLink('All affiliates');
foreach ($this->domains as $id => $domain) {
$this
->findLink($domain
->label());
$string = $domain
->label() . "</a></td><td>5</td>";
$this
->checkContent($content, $string);
}
$string = 'All affiliates</a></td><td>5</td>';
$this
->checkContent($content, $string);
}
}
}