UpdateCacheTest.php in Drupal 8
File
core/modules/system/tests/src/Functional/UpdateSystem/UpdateCacheTest.php
View source
<?php
namespace Drupal\Tests\system\Functional\UpdateSystem;
use Drupal\Core\Url;
use Drupal\Tests\BrowserTestBase;
use Drupal\Tests\RequirementsPageTrait;
class UpdateCacheTest extends BrowserTestBase {
use RequirementsPageTrait;
protected $defaultTheme = 'stark';
public function testCaches() {
\Drupal::cache()
->set('will_not_exist_after_update', TRUE);
$this
->writeSettings([
'settings' => [
'update_free_access' => (object) [
'value' => TRUE,
'required' => TRUE,
],
],
]);
$this
->drupalGet(Url::fromRoute('system.db_update', [], [
'path_processing' => FALSE,
]));
$this
->updateRequirementsProblem();
$this
->clickLink(t('Continue'));
$this
->assertFalse(\Drupal::cache()
->get('will_not_exist_after_update', FALSE));
}
}