You are here

public function CacheFlushTest::createTestEntitys in CacheFlush 7.3

Create cacheflush test entities.

1 call to CacheFlushTest::createTestEntitys()
CacheFlushTest::testClearPresetMenu in ./cacheflush.test
Check clear cache.

File

./cacheflush.test, line 102
Contains test suite for cacheflush module.

Class

CacheFlushTest
Defines a test for cacheflush module.

Code

public function createTestEntitys() {
  $options = _cacheflush_get_option_list();
  $data = array();
  $data['cache']['functions'] = $options['cache']['functions'];
  $data['cache_menu']['functions'] = $options['cache_menu']['functions'];
  $data['css']['functions'] = $options['css']['functions'];
  $data = serialize($data);
  $entity = entity_create('cacheflush', array(
    'title' => 'Enabled',
    'status' => 1,
    'data' => $data,
  ));
  $entity
    ->save();
  $entity = entity_create('cacheflush', array(
    'title' => 'Disabled',
    'status' => 0,
    'data' => $data,
  ));
  $entity
    ->save();
}