You are here

public function OptimizedbFunctionsTestCase::testCronClearTablePeriodTimeEmpty in OptimizeDB 7

Testing, when not set period of time clean-up table "cache_form" using Cron.

File

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

Class

OptimizedbFunctionsTestCase
Test the module functions.

Code

public function testCronClearTablePeriodTimeEmpty() {
  variable_set('optimizedb_clear_period_time', 0);
  variable_set('optimizedb_clear_period', 100);
  $this
    ->createCacheFormItem();
  $this
    ->assertEqual($this
    ->countCacheFormRows(), 1);
  $this
    ->cronRun();
  $this
    ->assertEqual($this
    ->countCacheFormRows(), 0);
}