You are here

protected function AuthcacheFlagTest::saveFlag in Authenticated User Page Caching (Authcache) 7.2

Save a flag to the database, clear caches, rebuild router.

4 calls to AuthcacheFlagTest::saveFlag()
AuthcacheFlagTest::createFlag in modules/authcache_flag/authcache_flag.test
Helper to create a flag from an array of data and clear caches etc.
AuthcacheFlagTest::testNodeMarkupSubstitution in modules/authcache_flag/authcache_flag.test
Test that the flag markup is substituted by a partial.
AuthcacheFlagTest::testTaxonomyTermMarkupSubstitution in modules/authcache_flag/authcache_flag.test
Test that the flag markup is substituted by a partial for taxonomy terms.
AuthcacheFlagTest::testUserMarkupSubstitution in modules/authcache_flag/authcache_flag.test
Test that the flag markup is substituted by a partial.

File

modules/authcache_flag/authcache_flag.test, line 208
Test cases for the Authcache Flag module.

Class

AuthcacheFlagTest
Tests for markup substitution.

Code

protected function saveFlag($flag) {
  $flag
    ->save();

  // Reset our cache so our permissions show up.
  drupal_static_reset('flag_get_flags');

  // Reset permissions so that permissions for this flag are available.
  $this
    ->checkPermissions(array(), TRUE);

  // Rebuild authcache personalization fragment router.
  authcache_p13n_request_router_rebuild();
  return $flag;
}