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