You are here

public function OptimizedbFunctionsTestCase::testCronClearTable in OptimizeDB 7

Test clear cache_form table in optimizedb_cron() function.

File

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

Class

OptimizedbFunctionsTestCase
Test the module functions.

Code

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