comparison core/modules/block/tests/src/Functional/BlockTest.php @ 5:12f9dff5fda9 tip

Update to Drupal core 8.7.1
author Chris Cannam
date Thu, 09 May 2019 15:34:47 +0100
parents a9cd425dd02b
children
comparison
equal deleted inserted replaced
4:a9cd425dd02b 5:12f9dff5fda9
375 375
376 // Verify a cache hit, but also the presence of the correct cache tags in 376 // Verify a cache hit, but also the presence of the correct cache tags in
377 // both the page and block caches. 377 // both the page and block caches.
378 $this->drupalGet('<front>'); 378 $this->drupalGet('<front>');
379 $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'HIT'); 379 $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'HIT');
380 $cid_parts = [\Drupal::url('<front>', [], ['absolute' => TRUE]), 'html']; 380 $cid_parts = [Url::fromRoute('<front>', [], ['absolute' => TRUE])->toString(), ''];
381 $cid = implode(':', $cid_parts); 381 $cid = implode(':', $cid_parts);
382 $cache_entry = \Drupal::cache('page')->get($cid); 382 $cache_entry = \Drupal::cache('page')->get($cid);
383 $expected_cache_tags = [ 383 $expected_cache_tags = [
384 'config:block_list', 384 'config:block_list',
385 'block_view', 385 'block_view',
416 $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'MISS'); 416 $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'MISS');
417 417
418 // Verify a cache hit, but also the presence of the correct cache tags. 418 // Verify a cache hit, but also the presence of the correct cache tags.
419 $this->drupalGet('<front>'); 419 $this->drupalGet('<front>');
420 $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'HIT'); 420 $this->assertEqual($this->drupalGetHeader('X-Drupal-Cache'), 'HIT');
421 $cid_parts = [\Drupal::url('<front>', [], ['absolute' => TRUE]), 'html']; 421 $cid_parts = [Url::fromRoute('<front>', [], ['absolute' => TRUE])->toString(), ''];
422 $cid = implode(':', $cid_parts); 422 $cid = implode(':', $cid_parts);
423 $cache_entry = \Drupal::cache('page')->get($cid); 423 $cache_entry = \Drupal::cache('page')->get($cid);
424 $expected_cache_tags = [ 424 $expected_cache_tags = [
425 'config:block_list', 425 'config:block_list',
426 'block_view', 426 'block_view',