You are here

public function OptimizedbFunctionsTestCase::testCronNotifyOptimize in OptimizeDB 7

Test notify optimize in optimizedb_cron() function.

File

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

Class

OptimizedbFunctionsTestCase
Test the module functions.

Code

public function testCronNotifyOptimize() {
  variable_set('optimizedb_optimization_period', 1);
  variable_set('optimizedb_last_optimization', REQUEST_TIME - 3600 * 24 * 2);
  variable_set('optimizedb_notify_optimize', FALSE);
  $this
    ->cronRun();
  $this
    ->assertTrue(variable_get('optimizedb_notify_optimize', FALSE));
}