Skip to content

Commit

Permalink
LIMS-697: Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Williams committed Jan 10, 2024
1 parent 21b0aba commit 0d77590
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/tests/Controllers/AssignControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ public function testGetPuckNamesWithPropAndValidBlSingleValReturnsData(): void
$this->assignController->args['prop'] = 3;
$this->assignController->args['bl'] = 'i03';
$this->assignController->proposalid = 3;
$this->assignController->shouldReceive('pv')->times(1)->andReturn(array('PUCK_1_NAME' => 'puck1', 'PUCK_12_NAME' => 'puck12'));
$this->assignController->shouldReceive('pv')->times(1)->andReturn(array('BL03I-MO-ROBOT-01:PUCK_01_NAME' => 'puck1', 'BL03I-MO-ROBOT-01:PUCK_12_NAME' => 'puck12'));
$this->dataLayerStub->expects($this->exactly(1))->method('getContainerBarcodesForProposal')->with(3)->willReturn(array(['BARCODE' => 1230, 'BL' => 'test03']));

$this->assignController->getPuckNames();
Expand All @@ -253,7 +253,7 @@ public function testGetPuckNamesWithPropAndValidBlArrayWithNoDataValReturnsObfus
$this->assignController->args['prop'] = 3;
$this->assignController->args['bl'] = 'i03';
$this->assignController->proposalid = 3;
$this->assignController->shouldReceive('pv')->times(1)->andReturn(array('PUCK_1_NAME' => array(11), 'PUCK_12_NAME' => array(12)));
$this->assignController->shouldReceive('pv')->times(1)->andReturn(array('BL03I-MO-ROBOT-01:PUCK_01_NAME' => array(11), 'BL03I-MO-ROBOT-01:PUCK_12_NAME' => array(12)));
$this->dataLayerStub->expects($this->exactly(1))->method('getContainerBarcodesForProposal')->with(3)->willReturn(array(['BARCODE' => 1230, 'BL' => 'test03']));

$this->assignController->getPuckNames();
Expand All @@ -266,7 +266,7 @@ public function testGetPuckNamesWithPropAndValidBlArrayWithMatchingDataValReturn
$this->assignController->args['prop'] = 3;
$this->assignController->args['bl'] = 'i03';
$this->assignController->proposalid = 3;
$this->assignController->shouldReceive('pv')->times(1)->andReturn(array('PUCK_1_NAME' => array(11), 'PUCK_12_NAME' => array(1230)));
$this->assignController->shouldReceive('pv')->times(1)->andReturn(array('BL03I-MO-ROBOT-01:PUCK_01_NAME' => array(11), 'BL03I-MO-ROBOT-01:PUCK_12_NAME' => array(1230)));
$this->dataLayerStub->expects($this->exactly(1))->method('getContainerBarcodesForProposal')->with(3)->willReturn(array(['BARCODE' => 1230, 'BL' => 'test03']));

$this->assignController->getPuckNames();
Expand All @@ -280,7 +280,7 @@ public function testGetPuckNamesWithPropAndValidBlArrayForStaffMemberReturnsReal
$this->assignController->args['bl'] = 'i03';
$this->assignController->proposalid = 3;
$this->assignController->staff = true;
$this->assignController->shouldReceive('pv')->times(1)->andReturn(array('PUCK_1_NAME' => array(11), 'PUCK_12_NAME' => array(1231)));
$this->assignController->shouldReceive('pv')->times(1)->andReturn(array('BL03I-MO-ROBOT-01:PUCK_01_NAME' => array(11), 'BL03I-MO-ROBOT-01:PUCK_12_NAME' => array(1231)));
$this->dataLayerStub->expects($this->exactly(1))->method('getContainerBarcodesForProposal')->with(3)->willReturn(array(['BARCODE' => 1230, 'BL' => 'test03']));

$this->assignController->getPuckNames();
Expand Down

0 comments on commit 0d77590

Please sign in to comment.