public function CacheFlushUICRUD::addInterfaceIntegrity in CacheFlush 8
Test if add interface has all buttons/links/etc.
1 call to CacheFlushUICRUD::addInterfaceIntegrity()
- CacheFlushUICRUD::testCrud in modules/
cacheflush_ui/ tests/ src/ Functional/ CacheFlushUICRUD.php - Run CRUD test functions.
File
- modules/
cacheflush_ui/ tests/ src/ Functional/ CacheFlushUICRUD.php, line 102
Class
- CacheFlushUICRUD
- Test the UI CRUD.
Namespace
Drupal\Tests\cacheflush_ui\FunctionalCode
public function addInterfaceIntegrity() {
$this
->drupalGet('admin/structure/cacheflush/add');
$this
->assertResponse(200);
$this
->assertFieldByName('title');
$this
->assertFieldByName('op', t('Save'));
$tabs = $this->moduleHandler
->invokeAll('cacheflush_ui_tabs');
if ($tabs) {
foreach ($tabs as $key => $value) {
$this
->assertText($value['name']);
}
}
$checkboxes = CacheflushApi::create($this->container)
->getOptionList();
if ($checkboxes) {
foreach ($checkboxes as $key => $value) {
$this
->assertFieldByName($value['category'] . "[{$key}]");
}
}
}