wip: fix issue with conditions not being properly removed

This commit is contained in:
Joel Male
2024-09-18 15:56:12 +10:00
parent c6c4240c5f
commit 472d505041
3 changed files with 5 additions and 8 deletions
+3 -3
View File
@@ -10,11 +10,11 @@
$events->shouldReceive('dispatch');
$this->cart = new Cart(
new SessionMock,
new SessionMock(),
$events,
'cart',
'SAMPLESESSIONKEY',
require (__DIR__ . '/../Helpers/ConfigConditionsMock.php')
require(__DIR__ . '/../Helpers/ConfigConditionsMock.php')
);
});
@@ -119,7 +119,7 @@
// now we should have only 1 condition left on that item
expect($this->cart->getConditions())->toHaveCount(1, 'Item should have one condition left');
expect($this->cart->getConditions()[0]->getName())->toEqual('Mother\'s Day Gift Pack');
expect($this->cart->getConditions()->first()->getName())->toEqual('Mother\'s Day Gift Pack');
});
});