/**
* @internal
*
* @covers \Shopware\Core\Checkout\Cart\RedisCartPersister
*/
class RedisCartPersisterTest extends TestCase
{ public function testDecorated(): void
{ $cartSerializationCleaner =
$this->
createMock(CartSerializationCleaner::
class);
$persister =
new RedisCartPersister(new RedisStub(),
new CollectingEventDispatcher(),
$cartSerializationCleaner, true, 90
);
$this->
expectException(DecorationPatternException::
class);
$persister->
getDecorated();
} public function testSave(): void
{ $token = Uuid::
randomHex();
$cart =
new Cart($token);
$cart->
add(new LineItem('test', 'test'
));
$dispatcher =
$this->
createMock(EventDispatcher::
class);