Skip to content

Commit

Permalink
Addressing failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffersoncasimir committed Feb 12, 2025
1 parent 3eea7d7 commit 1f77e78
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
11 changes: 9 additions & 2 deletions modules/timepoint_list/test/timepoint_listTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ class TimepointListIntegrationTest extends LorisIntegrationTestWithCandidate
*/
private static $_TST0001_CANDID = 900000;

/**
* ID for candidate TST0001.
*/
private static $_TST0001_CANDIDATEID = 1;


/**
* Tests that, when loading the timepoint_list module, some
* text appears in the body.
Expand Down Expand Up @@ -121,6 +127,7 @@ function testTimepointFilteringRules()
$this->DB->insert(
"candidate",
[
'ID' => 2,
'CandID' => '900001',
'PSCID' => 'TST0002',
'RegistrationCenterID' => 1,
Expand All @@ -136,7 +143,7 @@ function testTimepointFilteringRules()
'session',
[
'ID' => '999998',
'CandID' => '900001',
'CandidateID' => 2,
'Visit_label' => 'Test',
'CenterID' => 1,
'ProjectID' => 1,
Expand All @@ -149,7 +156,7 @@ function testTimepointFilteringRules()
'session',
[
'ID' => '999997',
'CandID' => self::$_TST0001_CANDID,
'CandidateID' => 1,
'Visit_label' => 'Test2',
'CenterID' => 1,
'ProjectID' => 1,
Expand Down
2 changes: 1 addition & 1 deletion php/libraries/CandIDGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class CandIDGenerator extends IdentifierGenerator
*/
private const LENGTH = 10;
private const MIN_CANDID = '100000';
private const MAX_CANDID = '9999999999';
private const MAX_CANDID = '4294967295';

/**
* Creates a new CandIDGenerator by initializing properties based on class
Expand Down
2 changes: 1 addition & 1 deletion test/unittests/CandidateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,7 @@ public function testParticipantStatusDescription()
$this->_DB->run("DROP TEMPORARY TABLE participant_status_options");
$this->_DB->run("DROP TEMPORARY TABLE participant_status");
$this->assertEquals(
$this->_candidate->getPSCID() . '--' . $this->_candidate->getCandID(),
$this->_candidate->getPSCID() . '--' . $this->_candidate->getData('ID'),
'description2'
);
}
Expand Down

0 comments on commit 1f77e78

Please sign in to comment.