Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
kekefreedog committed Dec 8, 2024
1 parent 73ce904 commit ed456b2
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions tests/Model/ModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,37 @@ public function testListOfAllModel():void {

}

/**
* Test List of All Model Names
*
* @return void
*/
public function testListOfAllModelNames():void {

# Get list
$result = Model::getListAllModelNames();

# Get models
$models = FileConfig::getValue("Model");

# Set model names
$modelNames = [];

# Check models
if(!empty($models))

# Iteration models
foreach($models as $model)

# Check name
if(isset($model["name"]) && $model["name"])

# Push result in model names
$modelNames[] = $model["name"];

# Check name
$this->assertEquals($modelNames, $result);

}

}

0 comments on commit ed456b2

Please sign in to comment.