3 namespace Drupal\Tests\system\Functional\Update;
5 use Drupal\FunctionalTests\Update\UpdatePathTestBase;
8 * Tests the update path with a broken router.
13 class UpdatePathWithBrokenRoutingTest extends UpdatePathTestBase {
18 protected function setDatabaseDumpFiles() {
19 $this->databaseDumpFiles = [
20 __DIR__ . '/../../../../tests/fixtures/update/drupal-8.bare.standard.php.gz',
21 __DIR__ . '/../../../../tests/fixtures/update/drupal-8.broken_routing.php',
26 * Tests running update.php with some form of broken routing.
28 public function testWithBrokenRouting() {
29 // Simulate a broken router, and make sure the front page is
31 \Drupal::state()->set('update_script_test_broken_inbound', TRUE);
32 \Drupal::service('cache_tags.invalidator')->invalidateTags(['route_match', 'rendered']);
33 $this->drupalGet('<front>');
34 $this->assertResponse(500);
38 // Remove the simulation of the broken router, and make sure we can get to
39 // the front page again.
40 \Drupal::state()->set('update_script_test_broken_inbound', FALSE);
41 $this->drupalGet('<front>');
42 $this->assertResponse(200);