diff --git a/modules/authcache_ajax/authcache_ajax.module b/modules/authcache_ajax/authcache_ajax.module index 6c08b0f..18eea9d 100644 --- a/modules/authcache_ajax/authcache_ajax.module +++ b/modules/authcache_ajax/authcache_ajax.module @@ -58,7 +58,7 @@ function theme_authcache_p13n_fragment__authcache_ajax($variables) { $attrs = array( 'class' => array('authcache-ajax-frag'), - 'data-authcache-ajax-src' => $url, + 'data-authcache-ajax-src' => url($url['path'], $url['options']), ); return ''; @@ -77,7 +77,7 @@ function theme_authcache_p13n_setting__authcache_ajax($variables) { drupal_add_js(drupal_get_path('module', 'authcache_p13n') . '/authcache_p13n.js'); drupal_add_js(drupal_get_path('module', 'authcache_ajax') . '/authcache_ajax.js'); - drupal_add_js(array('authcacheP13nAjaxSettings' => array($setting => $url)), 'setting'); + drupal_add_js(array('authcacheP13nAjaxSettings' => array($setting => url($url['path'], $url['options']))), 'setting'); return ''; } @@ -95,7 +95,7 @@ function theme_authcache_p13n_assembly__authcache_ajax($variables) { drupal_add_js(drupal_get_path('module', 'authcache_p13n') . '/authcache_p13n.js'); drupal_add_js(drupal_get_path('module', 'authcache_ajax') . '/authcache_ajax.js'); - drupal_add_js(array('authcacheP13nAjaxAssemblies' => array('span.' . $class => $url)), 'setting'); + drupal_add_js(array('authcacheP13nAjaxAssemblies' => array('span.' . $class => url($url['path'], $url['options']))), 'setting'); return ''; } diff --git a/modules/authcache_block/authcache_block.test b/modules/authcache_block/authcache_block.test index 79a3d2b..d8c216b 100644 --- a/modules/authcache_block/authcache_block.test +++ b/modules/authcache_block/authcache_block.test @@ -305,7 +305,7 @@ class AuthcacheBlockTest extends DrupalWebTestCase { $request_id = 'frag/block/' . $block_id; $url = authcache_p13n_request_get_callback($request_id, $block_id); $this->assertTrue($url); - $this->drupalGet($url, array(), array('X-Authcache: 1')); + $this->drupalGet($url['path'], $url['options'], array('X-Authcache: 1')); $this->assertText($block->title); } } diff --git a/modules/authcache_builtin/authcache_builtin.module b/modules/authcache_builtin/authcache_builtin.module index 9f8548a..1224631 100644 --- a/modules/authcache_builtin/authcache_builtin.module +++ b/modules/authcache_builtin/authcache_builtin.module @@ -39,7 +39,7 @@ function authcache_builtin_authcache_backend_key_set($key, $lifetime, $has_sessi } // Update cached key if necessary. - if ($has_session) { + if ($has_session && authcache_account_allows_caching()) { $expires = $lifetime ? REQUEST_TIME + $lifetime : CACHE_TEMPORARY; cache_set(session_id(), $key, 'cache_authcache_key', $expires); } diff --git a/modules/authcache_comment/authcache_comment.test b/modules/authcache_comment/authcache_comment.test index 9431052..6f40188 100644 --- a/modules/authcache_comment/authcache_comment.test +++ b/modules/authcache_comment/authcache_comment.test @@ -436,7 +436,7 @@ class AuthcacheCommentTest extends DrupalWebTestCase { )); $this->assertTrue($url); - $result = $this->drupalGetAJAX($url, array(), array('X-Authcache: 1')); + $result = $this->drupalGetAJAX($url['path'], $url['options'], array('X-Authcache: 1')); $expect = array('new' => array($this->node->nid => '')); $this->assertEqual($expect, $result, 'Should not report any new comments if there are none'); @@ -453,7 +453,7 @@ class AuthcacheCommentTest extends DrupalWebTestCase { // M1: Login again and verify that num-new reports a comment count of 1 now. $this->drupalLogin($this->member1); - $result = $this->drupalGetAJAX($url, array(), array('X-Authcache: 1')); + $result = $this->drupalGetAJAX($url['path'], $url['options'], array('X-Authcache: 1')); $expect = array( 'new' => array( $this->node->nid => '', diff --git a/modules/authcache_esi/authcache_esi.module b/modules/authcache_esi/authcache_esi.module index 3b1f702..d3851e0 100644 --- a/modules/authcache_esi/authcache_esi.module +++ b/modules/authcache_esi/authcache_esi.module @@ -54,7 +54,7 @@ function theme_authcache_p13n_fragment__authcache_esi($variables) { if ($url) { drupal_add_http_header('X-Authcache-Do-ESI', 1); - $attrs = array('src' => $url); + $attrs = array('src' => url($url['path'], $url['options'])); return ''; } } @@ -71,7 +71,7 @@ function theme_authcache_p13n_setting__authcache_esi($variables) { drupal_add_js(drupal_get_path('module', 'authcache_p13n') . '/authcache_p13n.js'); drupal_add_js(drupal_get_path('module', 'authcache_esi') . '/authcache_esi.js'); - $attrs = array('src' => $url); + $attrs = array('src' => url($url['path'], $url['options'])); return ''; } } @@ -94,7 +94,7 @@ function theme_authcache_p13n_assembly__authcache_esi($variables) { 'class' => array('authcache-esi-assembly'), 'data-authcache-esi-target' => 'span.' . $class, ); - $esi_attrs = array('src' => $url); + $esi_attrs = array('src' => url($url['path'], $url['options'])); return ''; } } diff --git a/modules/authcache_field/authcache_field.test b/modules/authcache_field/authcache_field.test index 9020b60..a26162a 100644 --- a/modules/authcache_field/authcache_field.test +++ b/modules/authcache_field/authcache_field.test @@ -179,7 +179,7 @@ class AuthcacheFieldTest extends DrupalWebTestCase { ), ); - $result = $this->drupalGetAJAX($url, array(), array('X-Authcache: 1')); + $result = $this->drupalGetAJAX($url['path'], $url['options'], array('X-Authcache: 1')); $this->assertResponse(200); $this->assertEqual($expect, $result); } @@ -203,7 +203,7 @@ class AuthcacheFieldTest extends DrupalWebTestCase { )); $this->assertTrue($url); - $result = $this->drupalGetAJAX($url, array(), array('X-Authcache: 1')); + $result = $this->drupalGetAJAX($url['path'], $url['options'], array('X-Authcache: 1')); $this->assertResponse(403); $this->assertFalse($result); } diff --git a/modules/authcache_flag/authcache_flag.test b/modules/authcache_flag/authcache_flag.test index 38c6685..7cf4371 100644 --- a/modules/authcache_flag/authcache_flag.test +++ b/modules/authcache_flag/authcache_flag.test @@ -404,7 +404,9 @@ class AuthcacheFlagTest extends DrupalWebTestCase { $this->assertTrue($url); // Fetch (both nodes unflagged). - $result = $this->drupalGetAJAX($url, array(), array('X-Authcache: 1')); + debug($url); + debug(url($url['path'], $url['options'])); + $result = $this->drupalGetAJAX($url['path'], $url['options'], array('X-Authcache: 1')); $this->assert(isset($result[$partial])); $this->assertEqual(array($this->node1->nid, $this->node2->nid), array_keys($result[$partial])); @@ -417,7 +419,7 @@ class AuthcacheFlagTest extends DrupalWebTestCase { $this->clickLink(t('Flag this item')); // Refetch (first node unflagged, second node flagged). - $result = $this->drupalGetAJAX($url, array(), array('X-Authcache: 1')); + $result = $this->drupalGetAJAX($url['path'], $url['options'], array('X-Authcache: 1')); $this->assert(isset($result[$partial])); $this->assertEqual(array($this->node1->nid, $this->node2->nid), array_keys($result[$partial])); @@ -430,7 +432,7 @@ class AuthcacheFlagTest extends DrupalWebTestCase { $this->clickLink(t('Unflag this item')); // Refetch (first node unflagged, second node flagged). - $result = $this->drupalGetAJAX($url, array(), array('X-Authcache: 1')); + $result = $this->drupalGetAJAX($url['path'], $url['options'], array('X-Authcache: 1')); $this->assert(isset($result[$partial])); $this->assertEqual(array($this->node1->nid, $this->node2->nid), array_keys($result[$partial])); @@ -455,7 +457,7 @@ class AuthcacheFlagTest extends DrupalWebTestCase { $this->assertTrue($url); // Fetch (both nodes unflagged). - $result = $this->drupalGetAJAX($url, array(), array('X-Authcache: 1')); + $result = $this->drupalGetAJAX($url['path'], $url['options'], array('X-Authcache: 1')); $this->assert(isset($result[$partial])); $this->assertEqual(array($this->node1->nid, $this->node2->nid), array_keys($result[$partial])); @@ -468,7 +470,7 @@ class AuthcacheFlagTest extends DrupalWebTestCase { $this->clickLink(t('Flag this item')); // Refetch (first node unflagged, second node flagged). - $result = $this->drupalGetAJAX($url, array(), array('X-Authcache: 1')); + $result = $this->drupalGetAJAX($url['path'], $url['options'], array('X-Authcache: 1')); $this->assert(isset($result[$partial])); $this->assertEqual(array($this->node1->nid, $this->node2->nid), array_keys($result[$partial])); @@ -491,7 +493,7 @@ class AuthcacheFlagTest extends DrupalWebTestCase { )); $this->assertTrue($url); - $result = $this->drupalGetAJAX($url, array(), array('X-Authcache: 1')); + $result = $this->drupalGetAJAX($url['path'], $url['options'], array('X-Authcache: 1')); $this->assertResponse(403); $this->assertFalse($result); } diff --git a/modules/authcache_form/tests/authcache_form.test b/modules/authcache_form/tests/authcache_form.test index 59d13a1..745e64d 100644 --- a/modules/authcache_form/tests/authcache_form.test +++ b/modules/authcache_form/tests/authcache_form.test @@ -494,7 +494,7 @@ class AuthcacheFormTestTokenDeferral extends DrupalWebTestCase { // Test form token retrieval. $url = authcache_p13n_request_get_callback('frag/form-token', 'authcache-form-test-form'); $headers = array('X-Authcache: 1'); - $this->drupalGet($url, array(), $headers); + $this->drupalGet($url['path'], $url['options'], $headers); $this->assertField('form_token'); } @@ -579,7 +579,7 @@ class AuthcacheFormTestTokenDeferral extends DrupalWebTestCase { // Test form build id retrieval. $url = authcache_p13n_request_get_callback('frag/form-build-id', $build_id); $headers = array('X-Authcache: 1'); - $this->drupalGet($url, array(), $headers); + $this->drupalGet($url['path'], $url['options'], $headers); $this->assertField('form_build_id'); } } diff --git a/modules/authcache_forum/authcache_forum.test b/modules/authcache_forum/authcache_forum.test index 09310af..7119e5c 100644 --- a/modules/authcache_forum/authcache_forum.test +++ b/modules/authcache_forum/authcache_forum.test @@ -433,13 +433,13 @@ class AuthcacheForumTest extends DrupalWebTestCase { )); $this->assertTrue($url); - $result = $this->drupalGetAJAX($url, array(), array('X-Authcache: 1')); + $result = $this->drupalGetAJAX($url['path'], $url['options'], array('X-Authcache: 1')); $expect = array('new' => array($this->forum['tid'] => '')); $this->assertEqual($expect, $result, 'Should not report any new topics, member1 is the owner of the topic'); // M2: Login and retrieve number-of-new-topics-assembly for forum list. $this->drupalLogin($this->member2); - $result = $this->drupalGetAJAX($url, array(), array('X-Authcache: 1')); + $result = $this->drupalGetAJAX($url['path'], $url['options'], array('X-Authcache: 1')); $expect = array( 'new' => array( $this->forum['tid'] => '', diff --git a/modules/authcache_menu/tests/authcache_menu.test b/modules/authcache_menu/tests/authcache_menu.test index f63c2ff..74db7ad 100644 --- a/modules/authcache_menu/tests/authcache_menu.test +++ b/modules/authcache_menu/tests/authcache_menu.test @@ -134,7 +134,7 @@ class AuthcacheMenuTestLocalTasks extends DrupalWebTestCase { $_GET['q'] = $orig_q; $headers = array('X-Authcache: 1'); - $this->drupalGet($url, array(), $headers); + $this->drupalGet($url['path'], $url['options'], $headers); $this->assertResponse(200); $this->assertText('View'); $this->assertText('Edit'); @@ -264,7 +264,7 @@ class AuthcacheMenuTestItemTitle extends DrupalWebTestCase { // Test menu item retrieval. $url = authcache_p13n_request_get_callback('frag/menu-item-title', 'node'); $headers = array('X-Authcache: 1'); - $this->drupalGet($url, array(), $headers); + $this->drupalGet($url['path'], $url['options'], $headers); $this->assertResponse(200); $this->assertText($nav_menu_title); } diff --git a/modules/authcache_node_history/authcache_node_history.test b/modules/authcache_node_history/authcache_node_history.test index 2f0cb22..c9ad0e2 100644 --- a/modules/authcache_node_history/authcache_node_history.test +++ b/modules/authcache_node_history/authcache_node_history.test @@ -164,7 +164,7 @@ class AuthcacheNodeHistoryTest extends DrupalWebTestCase { $this->assertTrue($url); // First request should report seeded timestamp. - $result = $this->drupalGetAjax($url, array(), array('X-Authcache: 1')); + $result = $this->drupalGetAjax($url['path'], $url['options'], array('X-Authcache: 1')); $this->assertResponse(200); $expect = array( 'authcacheNodeHistory' => array( @@ -174,7 +174,7 @@ class AuthcacheNodeHistoryTest extends DrupalWebTestCase { $this->assertEqual($expect, $result); // Second request should report later timestamp. - $result = $this->drupalGetAjax($url, array(), array('X-Authcache: 1')); + $result = $this->drupalGetAjax($url['path'], $url['options'], array('X-Authcache: 1')); $this->assertResponse(200); $this->assertEqual($result['authcacheNodeHistory'][0]['nid'], $this->node->nid); $this->assertTrue($result['authcacheNodeHistory'][0]['ts'] > $init_ts); @@ -201,7 +201,7 @@ class AuthcacheNodeHistoryTest extends DrupalWebTestCase { // First request should report seeded timestamp. $this->drupalGet('node/' . $this->node->nid); - $result = $this->drupalGetAjax($url, array(), array('X-Authcache: 1')); + $result = $this->drupalGetAjax($url['path'], $url['options'], array('X-Authcache: 1')); $this->assertResponse(200); $expect = array( 'authcacheNodeHistory' => array( @@ -212,7 +212,7 @@ class AuthcacheNodeHistoryTest extends DrupalWebTestCase { // Second request should report later timestamp. $this->drupalGet('node/' . $this->node->nid); - $result = $this->drupalGetAjax($url, array(), array('X-Authcache: 1')); + $result = $this->drupalGetAjax($url['path'], $url['options'], array('X-Authcache: 1')); $this->assertResponse(200); $this->assertEqual($result['authcacheNodeHistory'][0]['nid'], $this->node->nid); $this->assertTrue($result['authcacheNodeHistory'][0]['ts'] > $init_ts); diff --git a/modules/authcache_p13n/authcache_p13n.module b/modules/authcache_p13n/authcache_p13n.module index 7dafb69..058f05c 100644 --- a/modules/authcache_p13n/authcache_p13n.module +++ b/modules/authcache_p13n/authcache_p13n.module @@ -755,7 +755,7 @@ function authcache_p13n_request_exists($route_id) { */ function authcache_p13n_request_get_callback($route_id, $arg) { $router = authcache_p13n_request_get_router(); - return $router->generateUrl($route_id, $arg); + return $router->generateURL($route_id, $arg); } @@ -970,6 +970,7 @@ function _authcache_p13n_resource_proc_as_object($subject, $arg, $rname, $factor */ function authcache_p13n_authcache_p13n_base_request() { $frontcontroller_path = variable_get('authcache_p13n_frontcontroller_path', drupal_get_path('module', 'authcache_p13n') . '/frontcontroller/authcache.php'); + $frontcontroller_absolute = variable_get('authcache_p13n_frontcontroller_absolute', FALSE); // Note that fragment, setting, assembly request need to provide 'content // builder' and 'content encoder' resources. @@ -1049,13 +1050,17 @@ function authcache_p13n_authcache_p13n_base_request() { '@context providers', ), ), - 'frontcontroller' => array( + 'frontcontroller path' => array( '#value' => $frontcontroller_path, ), + 'frontcontroller absolute' => array( + '#value' => $frontcontroller_absolute, + ), 'url generator' => array( '#class' => 'AuthcacheP13nDefaultRequestUrlGenerator', '#arguments' => array( - '@frontcontroller', + '@frontcontroller path', + '@frontcontroller absolute', '@cache granularity object[require_instance(AuthcacheP13nCacheGranularity)]', ), ), diff --git a/modules/authcache_p13n/includes/AuthcacheP13nDefaultRequestUrlGenerator.inc b/modules/authcache_p13n/includes/AuthcacheP13nDefaultRequestUrlGenerator.inc index 85c8791..813975e 100644 --- a/modules/authcache_p13n/includes/AuthcacheP13nDefaultRequestUrlGenerator.inc +++ b/modules/authcache_p13n/includes/AuthcacheP13nDefaultRequestUrlGenerator.inc @@ -20,6 +20,14 @@ class AuthcacheP13nDefaultRequestUrlGenerator implements AuthcacheP13nRequestUrl protected $cacheGranularity; /** + * Whether to include the protocol and hostname in the URL to the front + * controller. + * + * @var bool + */ + protected $absoluteURL; + + /** * Construct new request URL generator. * * @param String $front_controller @@ -30,18 +38,18 @@ class AuthcacheP13nDefaultRequestUrlGenerator implements AuthcacheP13nRequestUrl */ public function __construct( $front_controller, + $absolute_url, AuthcacheP13nCacheGranularity $cache_granularity ) { $this->frontControllerPath = $front_controller; $this->cacheGranularity = $cache_granularity; + $this->absoluteURL = $absolute_url; } /** * {@inheritdoc} */ public function url($route_id, $arg) { - global $base_url; - $query = array( 'a' => $arg, 'r' => $route_id, @@ -58,9 +66,13 @@ class AuthcacheP13nDefaultRequestUrlGenerator implements AuthcacheP13nRequestUrl ); } - return url($base_url . '/' . $this->frontControllerPath, array( - 'absolute' => TRUE, - 'query' => $query, - )); + return array( + 'path' => $this->frontControllerPath, + 'options' => array( + 'absolute' => $this->absoluteURL, + 'alias' => TRUE, + 'query' => $query, + ), + ); } } diff --git a/modules/authcache_p13n/includes/AuthcacheP13nRequestUrlGeneratorInterface.inc b/modules/authcache_p13n/includes/AuthcacheP13nRequestUrlGeneratorInterface.inc index de5f647..8312957 100644 --- a/modules/authcache_p13n/includes/AuthcacheP13nRequestUrlGeneratorInterface.inc +++ b/modules/authcache_p13n/includes/AuthcacheP13nRequestUrlGeneratorInterface.inc @@ -11,6 +11,15 @@ interface AuthcacheP13nRequestUrlGeneratorInterface { /** * Generate an url for the given request and parameter. + * + * @returns array + * An associative array consisting of the following key-value pairs: + * - path: A relative or absolute URL without query or fragment suitable for + * supplying to the $path parameter of the drupal url() function. + * - options: An associative array containing the options as accepted by the + * $options parameter of the drupal url() function. + * + * @see url() */ public function url($route_id, $arg); } diff --git a/modules/authcache_p13n/tests/authcache_p13n.request-builder.test b/modules/authcache_p13n/tests/authcache_p13n.request-builder.test index 8eda18f..1c7c4ab 100644 --- a/modules/authcache_p13n/tests/authcache_p13n.request-builder.test +++ b/modules/authcache_p13n/tests/authcache_p13n.request-builder.test @@ -63,13 +63,15 @@ class AuthcacheP13nTestRequestBuilder extends DrupalWebTestCase { $result = authcache_p13n_request_get_callback('test/bad', array('my-args' => array('some' => 'args'))); $this->assertFalse($result); - $expect = url('http://example.com/authcache.php', array( - 'absolute' => TRUE, - 'query' => array( - 'r' => 'test/good', - 'a' => array('my-args' => array('some' => 'args')), + $expect = array( + 'path' => 'http://example.com/authcache.php', + 'options' => array( + 'query' => array( + 'r' => 'test/good', + 'a' => array('my-args' => array('some' => 'args')), + ), ), - )); + ); $result = authcache_p13n_request_get_callback('test/good', array('my-args' => array('some' => 'args'))); $this->assertEqual($expect, $result); @@ -249,14 +251,19 @@ class AuthcacheP13nTestRequestBuilder extends DrupalWebTestCase { ), '#type' => 'class', ), - 'frontcontroller' => array( + 'frontcontroller path' => array( '#value' => $frontcontroller_path, '#type' => 'value', ), + 'frontcontroller absolute' => array( + '#value' => FALSE, + '#type' => 'value', + ), 'url generator' => array( '#class' => 'AuthcacheP13nDefaultRequestUrlGenerator', '#arguments' => array( - '@frontcontroller', + '@frontcontroller path', + '@frontcontroller absolute', '@cache granularity object[require_instance(AuthcacheP13nCacheGranularity)]', ), '#type' => 'class', @@ -411,14 +418,19 @@ class AuthcacheP13nTestRequestBuilder extends DrupalWebTestCase { ), '#type' => 'class', ), - 'frontcontroller' => array( + 'frontcontroller path' => array( '#value' => $frontcontroller_path, '#type' => 'value', ), + 'frontcontroller absolute' => array( + '#value' => FALSE, + '#type' => 'value', + ), 'url generator' => array( '#class' => 'AuthcacheP13nDefaultRequestUrlGenerator', '#arguments' => array( - '@frontcontroller', + '@frontcontroller path', + '@frontcontroller absolute', '@cache granularity object[require_instance(AuthcacheP13nCacheGranularity)]', ), '#type' => 'class', @@ -573,14 +585,19 @@ class AuthcacheP13nTestRequestBuilder extends DrupalWebTestCase { ), '#type' => 'class', ), - 'frontcontroller' => array( + 'frontcontroller path' => array( '#value' => $frontcontroller_path, '#type' => 'value', ), + 'frontcontroller absolute' => array( + '#value' => FALSE, + '#type' => 'value', + ), 'url generator' => array( '#class' => 'AuthcacheP13nDefaultRequestUrlGenerator', '#arguments' => array( - '@frontcontroller', + '@frontcontroller path', + '@frontcontroller absolute', '@cache granularity object[require_instance(AuthcacheP13nCacheGranularity)]', ), '#type' => 'class', diff --git a/modules/authcache_p13n/tests/authcache_p13n.stub.inc b/modules/authcache_p13n/tests/authcache_p13n.stub.inc index 415aa4f..666ba96 100644 --- a/modules/authcache_p13n/tests/authcache_p13n.stub.inc +++ b/modules/authcache_p13n/tests/authcache_p13n.stub.inc @@ -565,13 +565,15 @@ class AuthcacheP13nTestRequestRouterStub implements AuthcacheP13nRequestRouterIn return FALSE; } else { - return url('http://example.com/authcache.php', array( - 'absolute' => TRUE, - 'query' => array( - 'r' => $route_id, - 'a' => $arg ?: '', + return array( + 'path' => 'http://example.com/authcache.php', + 'options' => array( + 'query' => array( + 'r' => $route_id, + 'a' => $arg ?: '', + ), ), - )); + ); } } @@ -638,13 +640,15 @@ class AuthcacheP13nTestRequestUrlGeneratorStub implements AuthcacheP13nRequestUr return FALSE; } else { - return url('http://example.com/authcache.php', array( - 'absolute' => TRUE, - 'query' => array( - 'r' => $route_id, - 'a' => $arg ?: '', + return array( + 'path' => 'http://example.com/authcache.php', + 'options' => array( + 'query' => array( + 'r' => $route_id, + 'a' => $arg ?: '', + ), ), - )); + ); } } } diff --git a/modules/authcache_panels_page_manager/authcache_panels_page_manager.test b/modules/authcache_panels_page_manager/authcache_panels_page_manager.test index 0b93e49..e6d1647 100644 --- a/modules/authcache_panels_page_manager/authcache_panels_page_manager.test +++ b/modules/authcache_panels_page_manager/authcache_panels_page_manager.test @@ -127,7 +127,7 @@ class AuthcachePanelsPageManagerTest extends DrupalWebTestCase { $this->assertTrue($url); - $this->drupalGet($url, array(), array('X-Authcache: 1')); + $this->drupalGet($url['path'], $url['options'], array('X-Authcache: 1')); $this->assertText('This fragment should be loaded via Ajax/ESI. Some context:'); $this->assertText('Authors email: ' . $this->admin->mail); $this->assertText('Logged in users email: ' . $this->member->mail); @@ -177,7 +177,7 @@ class AuthcachePanelsPageManagerTest extends DrupalWebTestCase { $this->assertTrue($url); - $this->drupalGet($url, array(), array('X-Authcache: 1')); + $this->drupalGet($url['path'], $url['options'], array('X-Authcache: 1')); $this->assertText('This fragment should be loaded via Ajax/ESI. Some context:'); $this->assertText('Authors email: ' . $this->admin->mail); $this->assertText('Logged in users email: ' . $this->member->mail); diff --git a/modules/authcache_user/authcache_user.test b/modules/authcache_user/authcache_user.test index 927f4d0..a80ed42 100644 --- a/modules/authcache_user/authcache_user.test +++ b/modules/authcache_user/authcache_user.test @@ -174,7 +174,7 @@ class AuthcacheUserTest extends DrupalWebTestCase { $this->assertTrue($url); // First request should report seeded timestamp. - $result = $this->drupalGetAjax($url, array(), array('X-Authcache: 1')); + $result = $this->drupalGetAjax($url['path'], $url['options'], array('X-Authcache: 1')); $this->assertResponse(200); $expect = array( 'authcacheUser' => array( diff --git a/modules/authcache_views/authcache_views.test b/modules/authcache_views/authcache_views.test index 0d08c20..7e6d014 100644 --- a/modules/authcache_views/authcache_views.test +++ b/modules/authcache_views/authcache_views.test @@ -249,7 +249,7 @@ class AuthcacheViewsTest extends DrupalWebTestCase { $_GET = $orig_get; $this->assertTrue($url); - $this->drupalGet($url, array(), array('X-Authcache: 1')); + $this->drupalGet($url['path'], $url['options'], array('X-Authcache: 1')); $this->assertText($this->nodeByAnon->title, 'Test node authored by anonymous user in the list'); $this->assertText($this->nodeByAdmin->title, 'Test node authored by admin user in the list'); @@ -260,7 +260,7 @@ class AuthcacheViewsTest extends DrupalWebTestCase { $_GET = $orig_get; $this->assertTrue($url); - $this->drupalGet($url, array(), array('X-Authcache: 1')); + $this->drupalGet($url['path'], $url['options'], array('X-Authcache: 1')); $this->assertText($this->nodeByAnon->title, 'Test node authored by anonymous user in the list'); $this->assertNoText($this->nodeByAdmin->title, 'Test node authored by admin user not in the list'); @@ -271,7 +271,7 @@ class AuthcacheViewsTest extends DrupalWebTestCase { $_GET = $orig_get; $this->assertTrue($url); - $this->drupalGet($url, array(), array('X-Authcache: 1')); + $this->drupalGet($url['path'], $url['options'], array('X-Authcache: 1')); $this->assertNoText($this->nodeByAnon->title, 'Test node authored by anonymous user not in the list'); $this->assertText($this->nodeByAdmin->title, 'Test node authored by admin user in the list'); }