public function EntityLegalDocumentTestCase::testAdminOverviewUi in Entity Legal 7
Same name and namespace in other branches
- 7.2 tests/entity_legal.document.test \EntityLegalDocumentTestCase::testAdminOverviewUi()
Test the overview page contains a list of entities.
File
- tests/
entity_legal.document.test, line 25 - Test file include for legal document.
Class
- EntityLegalDocumentTestCase
- Simpletest class for legal document entities.
Code
public function testAdminOverviewUi() {
// Create 3 legal documents.
$documents = array();
for ($i = 0; $i < 3; $i++) {
$documents[] = $this
->createDocument();
}
$this
->drupalLogin($this->adminUser);
$this
->drupalGet('admin/structure/legal');
foreach ($documents as $document) {
$this
->assertRaw($document
->label(), 'Legal document found on overview page');
$this
->assertLinkByHref('/admin/structure/legal/manage/' . $document
->identifier(), 0, 'Edit link for legal document appears on overview');
}
$this
->assertLinkByHref('/admin/structure/legal/add', 0, 'Add document link found');
}