public function HideNotificationTest::testHideNotification in OptimizeDB 8
Display notification of the need to perform optimization.
File
- tests/
src/ Functional/ HideNotificationTest.php, line 54
Class
- HideNotificationTest
- Test the page hide notification.
Namespace
Drupal\Tests\optimizedb\FunctionalCode
public function testHideNotification() {
$config = $this
->config('optimizedb.settings');
$config
->set('notify_optimize', FALSE)
->save();
$this
->drupalGet('admin/config/development/optimizedb/hide');
$this
->assertText($this
->t('Alerts are not available.'));
$config
->set('notify_optimize', TRUE)
->save();
$this
->drupalGet('admin/config/development/optimizedb/hide');
$this
->assertNoText($this
->t('Alerts are not available.'));
$notify_optimize = $this
->config('optimizedb.settings')
->get('notify_optimize');
$this
->assertFalse($notify_optimize);
}