Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
milwad-dev committed Jul 1, 2024
1 parent 71b34b9 commit 9749824
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/Cartable.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@
interface Cartable
{
public function getPrice(): int;

public function getKey(): mixed;
}
11 changes: 10 additions & 1 deletion tests/SetUp/Models/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,23 @@

namespace Tests\SetUp\Models;

use Binafy\LaravelCart\Cartable;
use Illuminate\Database\Eloquent\Model;

class Product extends Model
class Product extends Model implements Cartable
{
/**
* Fillable columns.
*
* @var string[]
*/
protected $fillable = ['title', 'price'];

/**
* Get the correct price.
*/
public function getPrice(): int
{
return $this->price;
}
}

0 comments on commit 9749824

Please sign in to comment.