public function save() { $data = serialize($this->toArray()); $this->store->put($this->id, $data); }
public function testSave() { $store = m::mock('Cart\\Storage\\Store'); $store->shouldReceive('put')->times(1); $cart = new Cart('foo', $store); $cart->save(); }