Skip to content

Commit

Permalink
test: add test for model loading
Browse files Browse the repository at this point in the history
  • Loading branch information
kenjis committed Sep 1, 2023
1 parent fee4f66 commit 4cf9780
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/CI3Compatible/Core/Loader/ModelLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,20 @@ public function test_load_one_model(): void
);
}

public function test_load_two_models(): void
{
$this->loader->load(['news_model', 'shop/shop_model']);

$this->assertInstanceOf(
'App\Models\News_model',
$this->controller->news_model
);
$this->assertInstanceOf(
'App\Models\Shop\Shop_model',
$this->controller->shop_model
);
}

public function test_load_one_model_twice(): void
{
$this->loader->load('news_model');
Expand Down

0 comments on commit 4cf9780

Please sign in to comment.