public function IndividualUiTest::testListBuilder in CRM Core 8.3
Test list builder views for contact entities.
@covers \Drupal\crm_core_contact\IndividualListBuilder::render
File
- modules/
crm_core_contact/ tests/ src/ Functional/ IndividualUiTest.php, line 401
Class
- IndividualUiTest
- Tests the UI for Individual CRUD operations.
Namespace
Drupal\Tests\crm_core_contact\FunctionalCode
public function testListBuilder() : void {
$user = $this
->drupalCreateUser([
'view any crm_core_individual entity',
'view any crm_core_organization entity',
'administer views',
]);
$this
->drupalLogin($user);
// Delete created organization view to get default view from list builder.
$this
->drupalGet('admin/structure/views/view/crm_core_organization_overview/delete');
$this
->drupalPostForm(NULL, [], 'Delete');
// Check organization collection page.
$this
->drupalGet('/crm-core/organization');
$this
->assertSession()
->statusCodeEquals(200);
// Delete created individual view to get default view from list builder.
$this
->drupalGet('admin/structure/views/view/crm_core_individual_overview/delete');
$this
->drupalPostForm(NULL, [], 'Delete');
// Assert response on individual collection page.
$this
->drupalGet('/crm-core/individual');
$this
->assertSession()
->statusCodeEquals(200);
}