Unverified Commit bdce2114 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3003401 by Sam152: UpdatePathTestBase calls setDatabaseDumpFiles twice,...

Issue #3003401 by Sam152: UpdatePathTestBase calls setDatabaseDumpFiles twice, resulting in duplicate fixtures in some scenarios

(cherry picked from commit daab6ad7)
parent b53adebe
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -170,8 +170,6 @@ protected function setUp() {
    // Install Drupal test site.
    $this->prepareEnvironment();
    $this->runDbTasks();
    // Allow classes to set database dump files.
    $this->setDatabaseDumpFiles();

    // We are going to set a missing zlib requirement property for usage
    // during the performUpgrade() and tearDown() methods. Also set that the
+10 −5
Original line number Diff line number Diff line
@@ -23,11 +23,9 @@ class UpdatePathTestBaseTest extends UpdatePathTestBase {
   * {@inheritdoc}
   */
  protected function setDatabaseDumpFiles() {
    $this->databaseDumpFiles = [
      __DIR__ . '/../../../../modules/system/tests/fixtures/update/drupal-8.8.0.bare.standard.php.gz',
      __DIR__ . '/../../../../modules/system/tests/fixtures/update/drupal-8.update-test-schema-enabled.php',
      __DIR__ . '/../../../../modules/system/tests/fixtures/update/drupal-8.update-test-semver-update-n-enabled.php',
    ];
    $this->databaseDumpFiles[] = __DIR__ . '/../../../../modules/system/tests/fixtures/update/drupal-8.8.0.bare.standard.php.gz';
    $this->databaseDumpFiles[] = __DIR__ . '/../../../../modules/system/tests/fixtures/update/drupal-8.update-test-schema-enabled.php';
    $this->databaseDumpFiles[] = __DIR__ . '/../../../../modules/system/tests/fixtures/update/drupal-8.update-test-semver-update-n-enabled.php';
  }

  /**
@@ -212,4 +210,11 @@ public function testSchemaChecking() {

  }

  /**
   * Test the database fixtures are setup correctly.
   */
  public function testFixturesSetup() {
    $this->assertCount(3, $this->databaseDumpFiles);
  }

}