Cart\Cart::save PHP Method

save() public method

Save the cart state.
public save ( )
    public function save()
    {
        $data = serialize($this->toArray());
        $this->store->put($this->id, $data);
    }

Usage Example

Beispiel #1
0
 public function testSave()
 {
     $store = m::mock('Cart\\Storage\\Store');
     $store->shouldReceive('put')->times(1);
     $cart = new Cart('foo', $store);
     $cart->save();
 }