You are here

public function OptimizedbHideNotificationTestCase::testHideNotification in OptimizeDB 7

Display notification of the need to perform optimization.

File

./optimizedb.test, line 260
Tests for optimizedb.module.

Class

OptimizedbHideNotificationTestCase
Test the optimizedb_hide_notification() function.

Code

public function testHideNotification() {
  variable_set('optimizedb_notify_optimize', FALSE);
  $this
    ->drupalGet('admin/config/development/optimizedb/hide');
  $this
    ->assertText(t('Alerts are not available.'));
  variable_set('optimizedb_notify_optimize', TRUE);
  $this
    ->drupalGet('admin/config/development/optimizedb/hide');
  $this
    ->assertNoText(t('Alerts are not available.'));
  $notify_optimize = variable_get('optimizedb_notify_optimize');
  $this
    ->assertFalse($notify_optimize);
}