From ea7979cabc9b96231d74d60ce64dcc4b6769fc74 Mon Sep 17 00:00:00 2001 From: TPGF00003 Date: Tue, 29 Oct 2024 10:20:40 +0900 Subject: [PATCH] =?UTF-8?q?=E3=83=A6=E3=83=8B=E3=83=83=E3=83=88=E3=83=86?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=82=92=E8=AA=BF=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tests/TestCase/Service/InstallationsServiceTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plugins/bc-installer/tests/TestCase/Service/InstallationsServiceTest.php b/plugins/bc-installer/tests/TestCase/Service/InstallationsServiceTest.php index aa7b7a3698..63734a69cb 100644 --- a/plugins/bc-installer/tests/TestCase/Service/InstallationsServiceTest.php +++ b/plugins/bc-installer/tests/TestCase/Service/InstallationsServiceTest.php @@ -20,6 +20,7 @@ use BaserCore\Utility\BcFile; use BcInstaller\Service\InstallationsService; use BcInstaller\Service\InstallationsServiceInterface; +use BcSearchIndex\Test\Scenario\Service\SearchIndexesServiceScenario; use Cake\Core\Configure; use Cake\ORM\Exception\PersistenceFailedException; use CakephpFixtureFactories\Scenario\ScenarioAwareTrait; @@ -237,7 +238,15 @@ public function test_deployAdminAssets() */ public function testExecuteDefaultUpdates() { + //準備 + $this->loadFixtureScenario(SearchIndexesServiceScenario::class); + $searchIndexesTable = $this->getTableLocator()->get('SearchIndexes'); + //テスト前、search_indexes テーブルにデータを確認 + $this->assertEquals(1, $searchIndexesTable->find()->count()); + //テストを実行 $this->assertTrue($this->Installations->executeDefaultUpdates()); + //テスト後、search_indexes テーブルにデータを確認 + $this->assertEquals(3, $searchIndexesTable->find()->count()); } /**