protected function AuthcacheP13nTestDatabaseKeyValueStore::dbInsertSampleData in Authenticated User Page Caching (Authcache) 7.2
Helper function: insert sample data into database.
4 calls to AuthcacheP13nTestDatabaseKeyValueStore::dbInsertSampleData()
- AuthcacheP13nTestDatabaseKeyValueStore::testDelete in modules/
authcache_p13n/ tests/ authcache_p13n.db-kv-store.test - Cover AuthcacheP13nDatabaseKeyValueStore::delete().
- AuthcacheP13nTestDatabaseKeyValueStore::testGet in modules/
authcache_p13n/ tests/ authcache_p13n.db-kv-store.test - Cover AuthcacheP13nDatabaseKeyValueStore::get().
- AuthcacheP13nTestDatabaseKeyValueStore::testGetKeys in modules/
authcache_p13n/ tests/ authcache_p13n.db-kv-store.test - Cover AuthcacheP13nDatabaseKeyValueStore::getKeys().
- AuthcacheP13nTestDatabaseKeyValueStore::testGetOne in modules/
authcache_p13n/ tests/ authcache_p13n.db-kv-store.test - Cover AuthcacheP13nDatabaseKeyValueStore::getOne().
File
- modules/
authcache_p13n/ tests/ authcache_p13n.db-kv-store.test, line 57 - Test case for database key-value store.
Class
- AuthcacheP13nTestDatabaseKeyValueStore
- Test database key-value store.
Code
protected function dbInsertSampleData() {
db_insert('authcache_p13n_key_value')
->fields(array(
'name',
'collection',
'value',
))
->values(array(
'name' => 'k1',
'collection' => 'store1',
'value' => serialize('v1'),
))
->values(array(
'name' => 'k2',
'collection' => 'store1',
'value' => serialize(array(
'some',
'stuff',
)),
))
->values(array(
'name' => 'k3',
'collection' => 'store1',
'value' => serialize((object) array(
'a' => 1,
'b' => 2,
)),
))
->values(array(
'name' => 'k1',
'collection' => 'store2',
'value' => serialize('same key, other store'),
))
->execute();
}