Skip to content

Commit

Permalink
ユニットテストを調整
Browse files Browse the repository at this point in the history
  • Loading branch information
TPGF00003 committed Oct 29, 2024
1 parent 4cf5eef commit ea7979c
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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());
}

/**
Expand Down

0 comments on commit ea7979c

Please sign in to comment.