You are here

public function SettingsTest::testGetApcuPrefix in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Site/SettingsTest.php \Drupal\Tests\Core\Site\SettingsTest::testGetApcuPrefix()

Tests Settings::getApcuPrefix().

@covers ::getApcuPrefix

File

core/tests/Drupal/Tests/Core/Site/SettingsTest.php, line 126
Contains \Drupal\Tests\Core\Site\SettingsTest.

Class

SettingsTest
@coversDefaultClass \Drupal\Core\Site\Settings @group Site

Namespace

Drupal\Tests\Core\Site

Code

public function testGetApcuPrefix() {
  $settings = new Settings(array(
    'hash_salt' => 123,
  ));
  $this
    ->assertNotEquals($settings::getApcuPrefix('cache_test', '/test/a'), $settings::getApcuPrefix('cache_test', '/test/b'));
  $settings = new Settings(array(
    'hash_salt' => 123,
    'apcu_ensure_unique_prefix' => FALSE,
  ));
  $this
    ->assertNotEquals($settings::getApcuPrefix('cache_test', '/test/a'), $settings::getApcuPrefix('cache_test', '/test/b'));
}