public function testDecrement(): void
{ $this->mysqlIncrementer->
increment('test-user-1', 'sw.product.index'
);
$this->mysqlIncrementer->
increment('test-user-1', 'sw.product.index'
);
$list =
$this->mysqlIncrementer->
list('test-user-1'
);
static::
assertNotNull($list['sw.product.index'
]);
static::
assertEquals(2,
$list['sw.product.index'
]['count'
]);
$this->mysqlIncrementer->
decrement('test-user-1', 'sw.product.index'
);
$list =
$this->mysqlIncrementer->
list('test-user-1'
);
static::
assertEquals(1,
$list['sw.product.index'
]['count'
]);
} public function testList(): void
{ $this->mysqlIncrementer->
increment('test-user-1', 'sw.order.index'
);
$this->mysqlIncrementer->
increment('test-user-1', 'sw.product.index'
);
$this->mysqlIncrementer->
increment('test-user-1', 'sw.product.index'
);