mirror of
https://github.com/kevin-DL/LaravelShoppingcart.git
synced 2026-01-23 23:51:25 +00:00
Fixed tests
This commit is contained in:
@@ -480,6 +480,7 @@ class CartTest extends Orchestra\Testbench\TestCase
|
|||||||
'price' => 10.00,
|
'price' => 10.00,
|
||||||
'tax' => 2.10,
|
'tax' => 2.10,
|
||||||
'subtotal' => 10.0,
|
'subtotal' => 10.0,
|
||||||
|
'options' => new \Gloudemans\Shoppingcart\CartItemOptions,
|
||||||
],
|
],
|
||||||
'370d08585360f5c568b18d1f2e4ca1df' => [
|
'370d08585360f5c568b18d1f2e4ca1df' => [
|
||||||
'rowId' => '370d08585360f5c568b18d1f2e4ca1df',
|
'rowId' => '370d08585360f5c568b18d1f2e4ca1df',
|
||||||
@@ -489,6 +490,7 @@ class CartTest extends Orchestra\Testbench\TestCase
|
|||||||
'price' => 10.00,
|
'price' => 10.00,
|
||||||
'tax' => 2.10,
|
'tax' => 2.10,
|
||||||
'subtotal' => 10.0,
|
'subtotal' => 10.0,
|
||||||
|
'options' => new \Gloudemans\Shoppingcart\CartItemOptions,
|
||||||
]
|
]
|
||||||
], $content->toArray());
|
], $content->toArray());
|
||||||
}
|
}
|
||||||
@@ -554,8 +556,10 @@ class CartTest extends Orchestra\Testbench\TestCase
|
|||||||
return $cartItem->name == 'Some item';
|
return $cartItem->name == 'Some item';
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->assertInstanceOf(\Gloudemans\Shoppingcart\CartItem::class, $cartItem);
|
$this->assertInstanceOf(\Illuminate\Support\Collection::class, $cartItem);
|
||||||
$this->assertEquals(1, $cartItem->id);
|
$this->assertCount(1, $cartItem);
|
||||||
|
$this->assertInstanceOf(\Gloudemans\Shoppingcart\CartItem::class, $cartItem->first());
|
||||||
|
$this->assertEquals(1, $cartItem->first()->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @test */
|
/** @test */
|
||||||
@@ -593,8 +597,10 @@ class CartTest extends Orchestra\Testbench\TestCase
|
|||||||
return $cartItem->options->color == 'red';
|
return $cartItem->options->color == 'red';
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->assertInstanceOf(\Gloudemans\Shoppingcart\CartItem::class, $cartItem);
|
$this->assertInstanceOf(\Illuminate\Support\Collection::class, $cartItem);
|
||||||
$this->assertEquals(1, $cartItem->id);
|
$this->assertCount(1, $cartItem);
|
||||||
|
$this->assertInstanceOf(\Gloudemans\Shoppingcart\CartItem::class, $cartItem->first());
|
||||||
|
$this->assertEquals(1, $cartItem->first()->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @test */
|
/** @test */
|
||||||
|
|||||||
Reference in New Issue
Block a user