Updated unit tests

This commit is contained in:
Rob Gloudemans
2013-07-08 22:47:54 +02:00
parent 30403752ae
commit b30f64e40c

View File

@@ -10,9 +10,17 @@ class CartTest extends TestCase {
$this->assertInstanceOf('Gloudemans\Shoppingcart\CartCollection', Cart::content());
}
public function testCartCanAddArray()
{
Cart::add(['id' => 1, 'name' => 'test', 'qty' => 1, 'price' => 10.00, 'options' => ['size' => 'L']]);
$this->assertEquals(Cart::count(), 1);
$this->assertInstanceOf('Gloudemans\Shoppingcart\CartCollection', Cart::content());
}
public function testCartCanAddBatch()
{
Cart::addBatch([
Cart::add([
['id' => 1, 'name' => 'test_1', 'qty' => 1, 'price' => 10.00],
['id' => 2, 'name' => 'test_2', 'qty' => 1, 'price' => 10.00, 'options' => ['size' => 'large']]
]);