From 7bd90d14b86aeab047e89ed1eaa0cf33af8e8387 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20D?= Date: Sat, 7 Sep 2024 08:37:47 +0200 Subject: [PATCH] test(fix): Fix Config Backup UT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rubén D --- .../Domain/Config/Services/ConfigBackupTest.php | 16 +++++++++------- tests/res/import/data_syspass.xml | 2 +- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/tests/SP/Domain/Config/Services/ConfigBackupTest.php b/tests/SP/Domain/Config/Services/ConfigBackupTest.php index 47bf0133..c47b777a 100644 --- a/tests/SP/Domain/Config/Services/ConfigBackupTest.php +++ b/tests/SP/Domain/Config/Services/ConfigBackupTest.php @@ -1,4 +1,5 @@ method('getConfigData'); $this->expectException(ServiceException::class); - $this->expectExceptionMessage('Unable to restore the configuration'); + $this->expectExceptionMessage('Unable to retrieve the configuration'); $this->configBackup->restore($configFile); } /** * @throws Exception - * @throws ServiceException * @throws FileException + * @throws SPException + * @throws ServiceException */ public function testRestoreWithMissingParam() { @@ -154,7 +158,7 @@ class ConfigBackupTest extends UnitaryTestCase ->method('getConfigData'); $this->expectException(ServiceException::class); - $this->expectExceptionMessage('Unable to restore the configuration'); + $this->expectExceptionMessage('Unable to retrieve the configuration'); $this->configBackup->restore($configFile); } @@ -194,7 +198,7 @@ class ConfigBackupTest extends UnitaryTestCase ->willReturn(null); $this->expectException(ServiceException::class); - $this->expectExceptionMessage('Unable to restore the configuration'); + $this->expectExceptionMessage('Unable to retrieve the configuration'); $this->configBackup->getBackup(); } @@ -206,7 +210,7 @@ class ConfigBackupTest extends UnitaryTestCase ->willThrowException(new NoSuchItemException('test')); $this->expectException(ServiceException::class); - $this->expectExceptionMessage('Unable to restore the configuration'); + $this->expectExceptionMessage('Unable to retrieve the configuration'); $this->configBackup->getBackup(); } @@ -219,6 +223,4 @@ class ConfigBackupTest extends UnitaryTestCase $this->configBackup = new ConfigBackup($this->configService); } - - } diff --git a/tests/res/import/data_syspass.xml b/tests/res/import/data_syspass.xml index 3930f7f0..499664ea 100644 --- a/tests/res/import/data_syspass.xml +++ b/tests/res/import/data_syspass.xml @@ -29,7 +29,7 @@ admin admin - + da39a3ee5e6b4b0d3255bfef95601890afd80709