chore: migrate to wearepixel/laravel-cart

This commit is contained in:
Joel Male
2026-03-24 14:04:48 +10:00
parent 6dfd0ce761
commit 8f442f51e0
31 changed files with 115 additions and 170 deletions
+6 -6
View File
@@ -1,9 +1,9 @@
<?php
use Joelwmale\Cart\Cart;
use Joelwmale\Cart\CartCondition;
use Joelwmale\Cart\Tests\Helpers\MockProduct;
use Joelwmale\Cart\Tests\Helpers\SessionMock;
use Wearepixel\Cart\Cart;
use Wearepixel\Cart\CartCondition;
use Wearepixel\Cart\Tests\Helpers\MockProduct;
use Wearepixel\Cart\Tests\Helpers\SessionMock;
beforeEach(function () {
$events = Mockery::mock('Illuminate\Contracts\Events\Dispatcher');
@@ -47,7 +47,7 @@
});
test('item get conditions with conditions', function () {
$itemCondition1 = new \Joelwmale\Cart\CartCondition([
$itemCondition1 = new \Wearepixel\Cart\CartCondition([
'name' => 'SALE 5%',
'type' => 'sale',
'target' => 'item',
@@ -77,7 +77,7 @@
});
test('it will throw an exception when a non existing model is being associated', function () {
$this->expectException(\Joelwmale\Cart\Exceptions\UnknownModelException::class);
$this->expectException(\Wearepixel\Cart\Exceptions\UnknownModelException::class);
$this->expectExceptionMessage('The supplied model SomeModel does not exist.');
$this->cart->add(1, 'Test item', 1, 10.00)->associate('SomeModel');