diff --git a/core/profiles/config_installer/src/Tests/ConfigInstallerFrTarballTest.php b/core/profiles/config_installer/src/Tests/ConfigInstallerFrTarballTest.php index 161bf04..0666bf2 100644 --- a/core/profiles/config_installer/src/Tests/ConfigInstallerFrTarballTest.php +++ b/core/profiles/config_installer/src/Tests/ConfigInstallerFrTarballTest.php @@ -15,18 +15,11 @@ class ConfigInstallerFrTarballTest extends ConfigInstallerTestBase { /** - * The french tarball of the minimal profile configuration exported. - * - * @var string - */ - protected $tarball = __DIR__ . '/Fixtures/minimal-fr.tar.gz'; - - /** * {@inheritdoc} */ protected function setUpSyncForm() { // Upload the tarball. - $this->drupalPostForm(NULL, ['files[import_tarball]' => $this->tarball], 'Save and continue'); + $this->drupalPostForm(NULL, ['files[import_tarball]' => $this->getTarball()], 'Save and continue'); } /** @@ -75,4 +68,12 @@ protected function getPo($langcode) { ENDPO; } + /** + * {@inheritdoc} + */ + protected function getTarball() { + // Exported configuration after a minimal profile install in French. + return __DIR__ . '/Fixtures/minimal-fr.tar.gz'; + } + } diff --git a/core/profiles/config_installer/src/Tests/ConfigInstallerSyncTest.php b/core/profiles/config_installer/src/Tests/ConfigInstallerSyncTest.php index 28527de..ae785e0 100644 --- a/core/profiles/config_installer/src/Tests/ConfigInstallerSyncTest.php +++ b/core/profiles/config_installer/src/Tests/ConfigInstallerSyncTest.php @@ -53,7 +53,7 @@ protected function setUpSyncForm() { drupal_mkdir($this->syncDir); // Extract the tarball into the sync directory. - $archiver = new ArchiveTar($this->tarball, 'gz'); + $archiver = new ArchiveTar($this->getTarball(), 'gz'); $files = []; foreach ($archiver->listContent() as $file) { $files[] = $file['filename']; diff --git a/core/profiles/config_installer/src/Tests/ConfigInstallerTarballTest.php b/core/profiles/config_installer/src/Tests/ConfigInstallerTarballTest.php index 4aa2526..d016abf 100644 --- a/core/profiles/config_installer/src/Tests/ConfigInstallerTarballTest.php +++ b/core/profiles/config_installer/src/Tests/ConfigInstallerTarballTest.php @@ -19,7 +19,7 @@ class ConfigInstallerTarballTest extends ConfigInstallerTestBase { */ protected function setUpSyncForm() { // Upload the tarball. - $this->drupalPostForm(NULL, ['files[import_tarball]' => $this->tarball], 'Save and continue'); + $this->drupalPostForm(NULL, ['files[import_tarball]' => $this->getTarball()], 'Save and continue'); } } diff --git a/core/profiles/config_installer/src/Tests/ConfigInstallerTestBase.php b/core/profiles/config_installer/src/Tests/ConfigInstallerTestBase.php index 3c3a437..d7ffee7 100644 --- a/core/profiles/config_installer/src/Tests/ConfigInstallerTestBase.php +++ b/core/profiles/config_installer/src/Tests/ConfigInstallerTestBase.php @@ -26,13 +26,6 @@ protected $profile = 'config_installer'; /** - * The tarball of the minimal profile configuration exported. - * - * @var string - */ - protected $tarball = __DIR__ . '/Fixtures/minimal.tar.gz'; - - /** * Ensures that the user page is available after installation. */ public function testInstaller() { @@ -114,4 +107,14 @@ protected function setUpInstallConfigureForm() { $this->drupalPostForm(NULL, $edit, $this->translations['Save and continue']); } + /** + * Gets the tarball for testing. + * + * @var string + */ + protected function getTarball() { + // Exported configuration after a minimal profile install. + return __DIR__ . '/Fixtures/minimal.tar.gz'; + } + }