From b6ef23f847c79fe631c9327cb8baed16a33225dc Mon Sep 17 00:00:00 2001 From: Kentaro Ohkouchi Date: Fri, 1 Mar 2024 01:27:47 +0900 Subject: [PATCH] Add assertion --- tests/Eccube/Tests/Service/PluginServiceTest.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/Eccube/Tests/Service/PluginServiceTest.php b/tests/Eccube/Tests/Service/PluginServiceTest.php index 410830d4dae..7ee83fcbc3f 100644 --- a/tests/Eccube/Tests/Service/PluginServiceTest.php +++ b/tests/Eccube/Tests/Service/PluginServiceTest.php @@ -134,6 +134,13 @@ public function testInstallPluginMinimum() } // 同じプラグインの二重インストールが蹴られるか + // --if-not-exists オプションの検証 + try { + $this->service->install($tmpfile, 0, true); + } catch (\Eccube\Exception\PluginException $e) { + $this->fail('--if-not-exists オプションを指定した場合は例外が発生しない: '.$e->getMessage()); + } + // アンインストールできるか $this->assertTrue((bool) $plugin = $this->pluginRepository->findOneBy(['code' => $tmpname])); $this->assertEquals(Constant::DISABLED, $plugin->isEnabled());