You are here

protected function AuthcacheWebTestCase::authcachePost in Authenticated User Page Caching (Authcache) 7.2

Utility method, login with specified account, send post-request, logout.

1 call to AuthcacheWebTestCase::authcachePost()
AuthcachePolicyTestCase::testDefaultExclusionRules in ./authcache.test
Test builtin standard cache exclusion rules.

File

./authcache.test, line 158
Tests for system.module.

Class

AuthcacheWebTestCase
Helper class for module test cases.

Code

protected function authcachePost($path, $account, $edit, $button, $options = array(), $headers = array()) {
  if ($account) {
    $this
      ->authcacheSetUser($account);
  }
  $this
    ->drupalGet($path);
  variable_set('authcache_test_record', TRUE);
  $result = $this
    ->drupalPost(NULL, $edit, $button, $options, $headers);
  variable_set('authcache_test_record', FALSE);
  return $result;
}