You are here

public function AuthcacheP13nTestDatabaseKeyValueStore::testGetOnEmptyCollection in Authenticated User Page Caching (Authcache) 7.2

Cover AuthcacheP13nDatabaseKeyValueStore::get().

File

modules/authcache_p13n/tests/authcache_p13n.db-kv-store.test, line 223
Test case for database key-value store.

Class

AuthcacheP13nTestDatabaseKeyValueStore
Test database key-value store.

Code

public function testGetOnEmptyCollection() {

  // Get all.
  $result = $this->store1
    ->get();
  $this
    ->assertEqual(array(), $result, 'Get all on empty collection returns empty array');

  // Get with empty key-set.
  $result = $this->store1
    ->get(array());
  $this
    ->assertEqual(array(), $result, 'Get with empty key-set returns empty array');

  // Get with specific keys.
  $result = $this->store1
    ->get(array(
    'k1',
    'k2',
    'k3',
  ));
  $this
    ->assertEqual(array(), $result, 'Get with specific key-set on empty collection returns empty array');
}