Skip to content

Commit

Permalink
Add two tests to check something that fails
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasdelellis committed Oct 16, 2024
1 parent bff5eb8 commit c47f32e
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/Integration/CreateClustersTaskTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,15 @@ public function testCreateSingleFaceCluster() {
$face = Face::fromModel($image->getId(), array("left"=>0, "right"=>100, "top"=>0, "bottom"=>100, "detection_confidence"=>1.0));
$faceMapper->insertFace($face);

/* Check inserted face */
$min_face_size = $settingsService->getMinimumFaceSize();
$min_confidence = $settingsService->getMinimumConfidence();

$groupablefaces = count($faceMapper->getGroupableFaces($this->user, ModelManager::DEFAULT_FACE_MODEL_ID, $min_face_size, $min_confidence));
$this->assertEquals(0, $groupablefaces);
$nonGroupablefaces = count($faceMapper->getNonGroupableFaces($this->user, ModelManager::DEFAULT_FACE_MODEL_ID, $min_face_size, $min_confidence));
$this->assertEquals(1, $nonGroupablefaces);

// With a single face should never create clusters.
$this->doCreateClustersTask($personMapper, $imageMapper, $faceMapper, $settingsService, $this->user);

Expand Down

0 comments on commit c47f32e

Please sign in to comment.