test: update existing tests to use CartDriver

This commit is contained in:
Joel Male
2026-05-27 21:09:40 +10:00
parent 9abf6a7a1b
commit 0c27ac4d9a
7 changed files with 26 additions and 28 deletions
+3 -4
View File
@@ -1,6 +1,7 @@
<?php
use Wearepixel\Cart\Cart;
use Wearepixel\Cart\Drivers\SessionDriver;
use Wearepixel\Cart\Tests\Helpers\SessionMock;
beforeEach(function () {
@@ -8,18 +9,16 @@
$events->shouldReceive('dispatch');
$this->cart1 = new Cart(
new SessionMock,
new SessionDriver(new SessionMock, 'uniquesessionkey123'),
$events,
'shopping',
'uniquesessionkey123',
require (__DIR__ . '/../Helpers/ConfigMock.php')
);
$this->cart2 = new Cart(
new SessionMock,
new SessionDriver(new SessionMock, 'uniquesessionkey456'),
$events,
'wishlist',
'uniquesessionkey456',
require (__DIR__ . '/../Helpers/ConfigMock.php')
);
});