diff --git a/database/migrations/2020_01_01_000300_create_bazar_items_table.php b/database/migrations/2020_01_01_000300_create_bazar_items_table.php index 38a1a43b..51ce38c9 100644 --- a/database/migrations/2020_01_01_000300_create_bazar_items_table.php +++ b/database/migrations/2020_01_01_000300_create_bazar_items_table.php @@ -13,7 +13,7 @@ public function up(): void { Schema::create('bazar_items', static function (Blueprint $table): void { $table->uuid('id')->primary(); - $table->morphs('itemable'); + $table->morphs('checkoutable'); $table->nullableMorphs('buyable'); $table->string('name'); $table->float('price')->unsigned(); diff --git a/src/Console/Commands/ClearCarts.php b/src/Console/Commands/ClearCarts.php index d6411488..35156251 100644 --- a/src/Console/Commands/ClearCarts.php +++ b/src/Console/Commands/ClearCarts.php @@ -30,15 +30,15 @@ public function handle(): void { if ($this->option('all')) { Cart::proxy()->newQuery()->truncate(); - Item::proxy()->newQuery()->where('itemable_type', Cart::getProxiedClass())->delete(); + Item::proxy()->newQuery()->where('checkoutable_type', Cart::getProxiedClass())->delete(); Shipping::proxy()->newQuery()->where('shippable_type', Cart::getProxiedClass())->delete(); $this->info('All carts have been deleted.'); } else { Item::proxy() ->newQuery() - ->where('itemable_type', Cart::getProxiedClass()) - ->whereIn('itemable_id', Cart::proxy()->newQuery()->expired()->select('id')) + ->where('checkoutable_type', Cart::getProxiedClass()) + ->whereIn('checkoutable_id', Cart::proxy()->newQuery()->expired()->select('id')) ->delete(); Shipping::proxy() diff --git a/src/Fields/Items.php b/src/Fields/Items.php index 640eca2f..41d40502 100644 --- a/src/Fields/Items.php +++ b/src/Fields/Items.php @@ -20,7 +20,7 @@ class Items extends MorphMany */ protected array $with = [ 'buyable', - 'itemable', + 'checkoutable', ]; /** @@ -61,14 +61,14 @@ public function fields(Request $request): array ->min(0) ->required() ->format(static function (Request $request, Model $model, ?float $value): string { - return (new Currency($value, $model->itemable->currency))->format(); + return (new Currency($value, $model->checkoutable->currency))->format(); }), Number::make(__('TAX'), 'tax') ->min(0) ->required() ->format(static function (Request $request, Model $model, ?float $value): string { - return (new Currency($value, $model->itemable->currency))->format(); + return (new Currency($value, $model->checkoutable->currency))->format(); }), Number::make(__('Quantity'), 'quantity') diff --git a/src/Gateway/Manager.php b/src/Gateway/Manager.php index 00082538..7249cbfb 100644 --- a/src/Gateway/Manager.php +++ b/src/Gateway/Manager.php @@ -3,7 +3,7 @@ namespace Cone\Bazar\Gateway; use Cone\Bazar\Interfaces\Gateway\Manager as Contract; -use Cone\Bazar\Interfaces\Itemable; +use Cone\Bazar\Interfaces\Checkoutable; use Illuminate\Contracts\Container\Container; use Illuminate\Support\Manager as BaseManager; @@ -31,7 +31,7 @@ public function getDefaultDriver(): string /** * Get the available drivers for the given model. */ - public function getAvailableDrivers(?Itemable $model = null): array + public function getAvailableDrivers(?Checkoutable $model = null): array { foreach (array_keys(array_diff_key($this->customCreators, parent::getDrivers())) as $key) { if (! isset($this->drivers[$key])) { diff --git a/src/Interfaces/Buyable.php b/src/Interfaces/Buyable.php index d25f2b6e..ecab40ea 100644 --- a/src/Interfaces/Buyable.php +++ b/src/Interfaces/Buyable.php @@ -7,12 +7,12 @@ interface Buyable { /** - * Determine whether the buyable object is available for the itemable instance. + * Determine whether the buyable object is available for the checkoutable instance. */ - public function buyable(Itemable $itemable): bool; + public function buyable(Checkoutable $checkoutable): bool; /** * Get the item representation of the buyable instance. */ - public function toItem(Itemable $itemable, array $attributes = []): Item; + public function toItem(Checkoutable $checkoutable, array $attributes = []): Item; } diff --git a/src/Interfaces/Itemable.php b/src/Interfaces/Checkoutable.php similarity index 94% rename from src/Interfaces/Itemable.php rename to src/Interfaces/Checkoutable.php index de460881..09e786a6 100644 --- a/src/Interfaces/Itemable.php +++ b/src/Interfaces/Checkoutable.php @@ -6,7 +6,7 @@ use Illuminate\Database\Eloquent\Relations\BelongsTo; use Illuminate\Database\Eloquent\Relations\MorphMany; -interface Itemable extends Shippable +interface Checkoutable extends Shippable { /** * Get the user for the model. @@ -44,7 +44,7 @@ public function getSubtotal(): float; public function getFormattedSubtotal(): string; /** - * Get the itemable model's fee total. + * Get the checkoutable model's fee total. */ public function getFeeTotal(): float; diff --git a/src/Interfaces/Gateway/Manager.php b/src/Interfaces/Gateway/Manager.php index e8fbc2c6..a98895e2 100644 --- a/src/Interfaces/Gateway/Manager.php +++ b/src/Interfaces/Gateway/Manager.php @@ -2,12 +2,12 @@ namespace Cone\Bazar\Interfaces\Gateway; -use Cone\Bazar\Interfaces\Itemable; +use Cone\Bazar\Interfaces\Checkoutable; interface Manager { /** * Get the available drivers for the given model. */ - public function getAvailableDrivers(?Itemable $model = null): array; + public function getAvailableDrivers(?Checkoutable $model = null): array; } diff --git a/src/Interfaces/Models/Cart.php b/src/Interfaces/Models/Cart.php index 156ce30a..2341d27f 100644 --- a/src/Interfaces/Models/Cart.php +++ b/src/Interfaces/Models/Cart.php @@ -3,10 +3,10 @@ namespace Cone\Bazar\Interfaces\Models; use Cone\Bazar\Interfaces\Discountable; -use Cone\Bazar\Interfaces\Itemable; +use Cone\Bazar\Interfaces\Checkoutable; use Illuminate\Database\Eloquent\Relations\BelongsTo; -interface Cart extends Discountable, Itemable +interface Cart extends Discountable, Checkoutable { /** * Get the order for the cart. diff --git a/src/Interfaces/Models/Item.php b/src/Interfaces/Models/Item.php index 0ae3aa5e..23d08d1a 100644 --- a/src/Interfaces/Models/Item.php +++ b/src/Interfaces/Models/Item.php @@ -13,9 +13,9 @@ interface Item extends LineItem public function buyable(): MorphTo; /** - * Get the itemable model for the item. + * Get the checkoutable model for the item. */ - public function itemable(): MorphTo; + public function checkoutable(): MorphTo; /** * Determine if the item is a line item. diff --git a/src/Interfaces/Models/Order.php b/src/Interfaces/Models/Order.php index bd6218ca..597a081c 100644 --- a/src/Interfaces/Models/Order.php +++ b/src/Interfaces/Models/Order.php @@ -3,12 +3,12 @@ namespace Cone\Bazar\Interfaces\Models; use Cone\Bazar\Interfaces\Discountable; -use Cone\Bazar\Interfaces\Itemable; +use Cone\Bazar\Interfaces\Checkoutable; use Illuminate\Database\Eloquent\Relations\HasMany; use Illuminate\Database\Eloquent\Relations\HasOne; use Illuminate\Notifications\Notification; -interface Order extends Discountable, Itemable +interface Order extends Discountable, Checkoutable { /** * Get the cart for the order. diff --git a/src/Interfaces/Shipping/Manager.php b/src/Interfaces/Shipping/Manager.php index b960e8a9..a7dea2cb 100644 --- a/src/Interfaces/Shipping/Manager.php +++ b/src/Interfaces/Shipping/Manager.php @@ -2,12 +2,12 @@ namespace Cone\Bazar\Interfaces\Shipping; -use Cone\Bazar\Interfaces\Itemable; +use Cone\Bazar\Interfaces\Checkoutable; interface Manager { /** * Get the available drivers for the given model. */ - public function getAvailableDrivers(?Itemable $model = null): array; + public function getAvailableDrivers(?Checkoutable $model = null): array; } diff --git a/src/Models/Item.php b/src/Models/Item.php index 040af09f..c7a1b587 100644 --- a/src/Models/Item.php +++ b/src/Models/Item.php @@ -78,7 +78,7 @@ class Item extends Model implements Contract * @var list */ protected $hidden = [ - 'itemable', + 'checkoutable', ]; /** @@ -121,9 +121,9 @@ public function buyable(): MorphTo } /** - * Get the itemable model for the item. + * Get the checkoutable model for the item. */ - public function itemable(): MorphTo + public function checkoutable(): MorphTo { return $this->morphTo()->withDefault(); } @@ -209,7 +209,7 @@ public function getPrice(): float */ public function getFormattedPrice(): string { - return (new Currency($this->getPrice(), $this->itemable->getCurrency()))->format(); + return (new Currency($this->getPrice(), $this->checkoutable->getCurrency()))->format(); } /** @@ -225,7 +225,7 @@ public function getTotal(): float */ public function getFormattedTotal(): string { - return (new Currency($this->getTotal(), $this->itemable->getCurrency()))->format(); + return (new Currency($this->getTotal(), $this->checkoutable->getCurrency()))->format(); } /** @@ -241,7 +241,7 @@ public function getSubtotal(): float */ public function getFormattedSubtotal(): string { - return (new Currency($this->getSubtotal(), $this->itemable->getCurrency()))->format(); + return (new Currency($this->getSubtotal(), $this->checkoutable->getCurrency()))->format(); } /** diff --git a/src/Models/Product.php b/src/Models/Product.php index 301823d0..7bb1d5ed 100644 --- a/src/Models/Product.php +++ b/src/Models/Product.php @@ -3,11 +3,11 @@ namespace Cone\Bazar\Models; use Cone\Bazar\Database\Factories\ProductFactory; -use Cone\Bazar\Interfaces\Itemable; +use Cone\Bazar\Interfaces\Checkoutable; use Cone\Bazar\Interfaces\Models\Product as Contract; use Cone\Bazar\Traits\HasPrices; use Cone\Bazar\Traits\HasProperties; -use Cone\Bazar\Traits\InteractsWithItemables; +use Cone\Bazar\Traits\InteractsWithCheckoutables; use Cone\Bazar\Traits\InteractsWithStock; use Cone\Root\Traits\HasMedia; use Cone\Root\Traits\HasMetaData; @@ -28,7 +28,7 @@ class Product extends Model implements Contract use HasMetaData; use HasPrices; use HasProperties; - use InteractsWithItemables; + use InteractsWithCheckoutables; use InteractsWithProxy; use InteractsWithStock; use SoftDeletes; @@ -92,9 +92,9 @@ public function variants(): HasMany } /** - * Determine whether the buyable object is available for the itemable instance. + * Determine whether the buyable object is available for the checkoutable instance. */ - public function buyable(Itemable $itemable): bool + public function buyable(Checkoutable $checkoutable): bool { return true; } @@ -150,15 +150,15 @@ function (QueryBuilder $query): QueryBuilder { /** * Get the item representation of the buyable instance. */ - public function toItem(Itemable $itemable, array $attributes = []): Item + public function toItem(Checkoutable $checkoutable, array $attributes = []): Item { if ($variant = $this->toVariant($attributes['properties'] ?? [])) { - return $variant->toItem($itemable, $attributes); + return $variant->toItem($checkoutable, $attributes); } return $this->items()->make(array_merge([ 'name' => $this->name, - 'price' => $this->getPrice($itemable->getCurrency()), + 'price' => $this->getPrice($checkoutable->getCurrency()), 'quantity' => 1, ], $attributes))->setRelation('buyable', $this); } diff --git a/src/Models/Variant.php b/src/Models/Variant.php index 1d0c1ceb..3d2cb18b 100644 --- a/src/Models/Variant.php +++ b/src/Models/Variant.php @@ -3,11 +3,11 @@ namespace Cone\Bazar\Models; use Cone\Bazar\Database\Factories\VariantFactory; -use Cone\Bazar\Interfaces\Itemable; +use Cone\Bazar\Interfaces\Checkoutable; use Cone\Bazar\Interfaces\Models\Variant as Contract; use Cone\Bazar\Traits\HasPrices; use Cone\Bazar\Traits\HasProperties; -use Cone\Bazar\Traits\InteractsWithItemables; +use Cone\Bazar\Traits\InteractsWithCheckoutables; use Cone\Bazar\Traits\InteractsWithStock; use Cone\Root\Traits\HasMedia; use Cone\Root\Traits\HasMetaData; @@ -28,7 +28,7 @@ class Variant extends Model implements Contract HasPrices::getPrice as __getPrice; } use HasProperties; - use InteractsWithItemables; + use InteractsWithCheckoutables; use InteractsWithProxy; use InteractsWithStock; use SoftDeletes; @@ -112,9 +112,9 @@ protected function alias(): Attribute } /** - * Determine whether the buyable object is available for the itemable instance. + * Determine whether the buyable object is available for the checkoutable instance. */ - public function buyable(Itemable $itemable): bool + public function buyable(Checkoutable $checkoutable): bool { return true; } @@ -130,11 +130,11 @@ public function getPrice(?string $currency = null): ?float /** * Get the item representation of the buyable instance. */ - public function toItem(Itemable $itemable, array $attributes = []): Item + public function toItem(Checkoutable $checkoutable, array $attributes = []): Item { return $this->items()->make(array_merge([ 'name' => $this->name, - 'price' => $this->getPrice($itemable->getCurrency()), + 'price' => $this->getPrice($checkoutable->getCurrency()), 'quantity' => 1, ], $attributes))->setRelation('buyable', $this); } diff --git a/src/Resources/TaxRateResource.php b/src/Resources/TaxRateResource.php deleted file mode 100644 index e69de29b..00000000 diff --git a/src/Shipping/Manager.php b/src/Shipping/Manager.php index 75cd67b9..1d946d84 100644 --- a/src/Shipping/Manager.php +++ b/src/Shipping/Manager.php @@ -2,7 +2,7 @@ namespace Cone\Bazar\Shipping; -use Cone\Bazar\Interfaces\Itemable; +use Cone\Bazar\Interfaces\Checkoutable; use Cone\Bazar\Interfaces\Shipping\Manager as Contract; use Illuminate\Contracts\Container\Container; use Illuminate\Support\Manager as BaseManager; @@ -30,7 +30,7 @@ public function getDefaultDriver(): string /** * Get the available drivers for the given model. */ - public function getAvailableDrivers(?Itemable $model = null): array + public function getAvailableDrivers(?Checkoutable $model = null): array { foreach (array_keys(array_diff_key($this->customCreators, parent::getDrivers())) as $key) { if (! isset($this->drivers[$key])) { diff --git a/src/Support/Driver.php b/src/Support/Driver.php index dabe7e8b..8a6e2c1c 100644 --- a/src/Support/Driver.php +++ b/src/Support/Driver.php @@ -2,7 +2,7 @@ namespace Cone\Bazar\Support; -use Cone\Bazar\Interfaces\Itemable; +use Cone\Bazar\Interfaces\Checkoutable; use Illuminate\Support\Str; abstract class Driver @@ -29,7 +29,7 @@ public function __construct(array $config = []) /** * Determine if the driver is available for the given model. */ - public function available(Itemable $model): bool + public function available(Checkoutable $model): bool { return $this->enabled(); } diff --git a/src/Support/Facades/Gateway.php b/src/Support/Facades/Gateway.php index 78d8334d..d8403456 100644 --- a/src/Support/Facades/Gateway.php +++ b/src/Support/Facades/Gateway.php @@ -6,7 +6,7 @@ use Illuminate\Support\Facades\Facade; /** - * @method static array getAvailableDrivers(\Cone\Bazar\Interfaces\Itemable $model) + * @method static array getAvailableDrivers(\Cone\Bazar\Interfaces\Checkoutable $model) * @method static \Cone\Bazar\Gateway\Driver driver(string $driver) * * @see \Cone\Bazar\Interfaces\Gateway\Manager diff --git a/src/Support/Facades/Shipping.php b/src/Support/Facades/Shipping.php index 3590f57b..b033ac3d 100644 --- a/src/Support/Facades/Shipping.php +++ b/src/Support/Facades/Shipping.php @@ -6,7 +6,7 @@ use Illuminate\Support\Facades\Facade; /** - * @method static array getAvailableDrivers(\Cone\Bazar\Interfaces\Itemable $model) + * @method static array getAvailableDrivers(\Cone\Bazar\Interfaces\Checkoutable $model) * * @see \Cone\Bazar\Interfaces\Shipping\Manager */ diff --git a/src/Traits/InteractsWithItemables.php b/src/Traits/InteractsWithCheckoutables.php similarity index 78% rename from src/Traits/InteractsWithItemables.php rename to src/Traits/InteractsWithCheckoutables.php index fe32f232..58532b75 100644 --- a/src/Traits/InteractsWithItemables.php +++ b/src/Traits/InteractsWithCheckoutables.php @@ -8,7 +8,7 @@ use Illuminate\Database\Eloquent\Relations\HasManyThrough; use Illuminate\Database\Eloquent\Relations\MorphMany; -trait InteractsWithItemables +trait InteractsWithCheckoutables { /** * Get the items for the product. @@ -25,8 +25,8 @@ public function items(): MorphMany */ public function orders(): HasManyThrough { - return $this->hasManyThrough(Order::getProxiedClass(), Item::getProxiedClass(), 'buyable_id', 'id', 'id', 'itemable_id') - ->where('itemable_type', Order::getProxiedClass()) + return $this->hasManyThrough(Order::getProxiedClass(), Item::getProxiedClass(), 'buyable_id', 'id', 'id', 'checkoutable_id') + ->where('checkoutable_type', Order::getProxiedClass()) ->where('buyable_type', static::class); } @@ -37,8 +37,8 @@ public function orders(): HasManyThrough */ public function carts(): HasManyThrough { - return $this->hasManyThrough(Cart::getProxiedClass(), Item::getProxiedClass(), 'buyable_id', 'id', 'id', 'itemable_id') - ->where('itemable_type', Cart::getProxiedClass()) + return $this->hasManyThrough(Cart::getProxiedClass(), Item::getProxiedClass(), 'buyable_id', 'id', 'id', 'checkoutable_id') + ->where('checkoutable_type', Cart::getProxiedClass()) ->where('buyable_type', static::class); } } diff --git a/src/Traits/InteractsWithItems.php b/src/Traits/InteractsWithItems.php index a5f694c3..70edbff9 100644 --- a/src/Traits/InteractsWithItems.php +++ b/src/Traits/InteractsWithItems.php @@ -47,7 +47,7 @@ public function user(): BelongsTo */ public function items(): MorphMany { - return $this->morphMany(Item::getProxiedClass(), 'itemable'); + return $this->morphMany(Item::getProxiedClass(), 'checkoutable'); } /** @@ -223,7 +223,7 @@ public function getCurrency(): string } /** - * Get the itemable model's total. + * Get the checkoutable model's total. */ public function getTotal(): float { @@ -245,7 +245,7 @@ public function getFormattedTotal(): string } /** - * Get the itemable model's subtotal. + * Get the checkoutable model's subtotal. */ public function getSubtotal(): float { @@ -265,7 +265,7 @@ public function getFormattedSubtotal(): string } /** - * Get the itemable model's fee total. + * Get the checkoutable model's fee total. */ public function getFeeTotal(): float { @@ -320,8 +320,8 @@ public function calculateTax(bool $update = true): float public function findItem(array $attributes): ?Item { $attributes = array_merge(['properties' => null], $attributes, [ - 'itemable_id' => $this->getKey(), - 'itemable_type' => static::class, + 'checkoutable_id' => $this->getKey(), + 'checkoutable_type' => static::class, ]); return $this->items->first(static function (Item $item) use ($attributes): bool { @@ -342,9 +342,9 @@ public function mergeItem(Item $item): Item ); if (is_null($stored)) { - $item->itemable()->associate($this); + $item->checkoutable()->associate($this); - $item->setRelation('itemable', $this->withoutRelations()); + $item->setRelation('checkoutable', $this->withoutRelations()); $this->items->push($item); @@ -362,8 +362,8 @@ public function mergeItem(Item $item): Item public function syncItems(): void { $this->items->each(static function (Item $item): void { - if ($item->isLineItem() && ! is_null($item->itemable)) { - $data = $item->buyable->toItem($item->itemable, $item->only('properties'))->only('price'); + if ($item->isLineItem() && ! is_null($item->checkoutable)) { + $data = $item->buyable->toItem($item->checkoutable, $item->only('properties'))->only('price'); $item->fill($data)->calculateTax(); } diff --git a/src/Traits/InteractsWithTaxes.php b/src/Traits/InteractsWithTaxes.php index e2635a9a..d146028b 100644 --- a/src/Traits/InteractsWithTaxes.php +++ b/src/Traits/InteractsWithTaxes.php @@ -39,7 +39,7 @@ public function getFormattedTax(): string $currency = Bazar::getCurrency(); if ($this instanceof Item) { - $currency = $this->itemable->currency; + $currency = $this->checkoutable->currency; } if ($this instanceof Shipping) { diff --git a/tests/Gateway/ManagerTest.php b/tests/Gateway/ManagerTest.php index b0f16a0b..84b07f24 100644 --- a/tests/Gateway/ManagerTest.php +++ b/tests/Gateway/ManagerTest.php @@ -66,7 +66,7 @@ public function setUp(): void }); } - public function test_gateway_can_list_available_drivers_for_itemable_model(): void + public function test_gateway_can_list_available_drivers_for_checkoutable_model(): void { $this->assertEquals( ['cash', 'transfer', 'custom-driver', 'failing-driver'], diff --git a/tests/Models/ItemTest.php b/tests/Models/ItemTest.php index 54297e8b..708de7ed 100644 --- a/tests/Models/ItemTest.php +++ b/tests/Models/ItemTest.php @@ -29,14 +29,14 @@ public function setUp(): void 'properties' => ['text' => 'test-text'], ]); - $this->item->buyable()->associate($product)->itemable()->associate($cart)->save(); + $this->item->buyable()->associate($product)->checkoutable()->associate($cart)->save(); } public function test_item_is_taxable(): void { $this->assertInstanceOf(Taxable::class, $this->item); $this->assertSame( - (new Currency($this->item->tax, $this->item->itemable->currency))->format(), + (new Currency($this->item->tax, $this->item->checkoutable->currency))->format(), $this->item->getFormattedTax() ); $this->assertSame($this->item->getFormattedTax(), $this->item->formattedTax); @@ -46,7 +46,7 @@ public function test_item_has_price_attribute(): void { $this->assertSame($this->item->price, $this->item->getPrice()); $this->assertSame( - (new Currency($this->item->price, $this->item->itemable->currency))->format(), + (new Currency($this->item->price, $this->item->checkoutable->currency))->format(), $this->item->getFormattedPrice() ); $this->assertSame($this->item->getFormattedPrice(), $this->item->formattedPrice); @@ -60,14 +60,14 @@ public function test_item_has_total_attribute(): void ); $this->assertSame($this->item->getTotal(), $this->item->total); $this->assertSame( - (new Currency($this->item->total, $this->item->itemable->currency))->format(), + (new Currency($this->item->total, $this->item->checkoutable->currency))->format(), $this->item->getFormattedTotal() ); $this->assertSame($this->item->getFormattedTotal(), $this->item->formattedTotal); $this->assertSame($this->item->price * $this->item->quantity, $this->item->getSubtotal()); $this->assertSame($this->item->getSubtotal(), $this->item->subtotal); $this->assertSame( - (new Currency($this->item->subtotal, $this->item->itemable->currency))->format(), + (new Currency($this->item->subtotal, $this->item->checkoutable->currency))->format(), $this->item->getFormattedSubtotal() ); $this->assertSame($this->item->getFormattedSubtotal(), $this->item->formattedSubtotal); diff --git a/tests/Models/ProductTest.php b/tests/Models/ProductTest.php index a4459722..65554bff 100644 --- a/tests/Models/ProductTest.php +++ b/tests/Models/ProductTest.php @@ -38,7 +38,7 @@ public function test_product_has_many_orders_through_items(): void 'tax' => 0, 'quantity' => 3, 'name' => $this->product->name, - ])->itemable()->associate($order); + ])->checkoutable()->associate($order); $this->product->items()->save($item); @@ -54,7 +54,7 @@ public function test_product_belongs_to_carts(): void 'tax' => 0, 'quantity' => 3, 'name' => $this->product->name, - ])->itemable()->associate($cart); + ])->checkoutable()->associate($cart); $this->product->items()->save($item); diff --git a/tests/Shipping/ManagerTest.php b/tests/Shipping/ManagerTest.php index a9dbb688..5df5b82e 100644 --- a/tests/Shipping/ManagerTest.php +++ b/tests/Shipping/ManagerTest.php @@ -27,7 +27,7 @@ public function setUp(): void }); } - public function test_shipping_can_list_available_drivers_for_itemable_model(): void + public function test_shipping_can_list_available_drivers_for_checkoutable_model(): void { $this->assertEquals( ['local-pickup', 'custom-driver'],