Skip to content

Commit 4f400a3

Browse files
committed
fix: correct expected type in MemcachedHandlerTest::testDecrement
1 parent ea34216 commit 4f400a3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/system/Cache/Handlers/MemcachedHandlerTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,9 @@ public function testDecrement(): void
154154
// A key that doesn't exist yet starts at 0, not at the offset
155155
// (Memcached counters are unsigned, so it can't start negative).
156156
$this->assertSame(0, $memcachedHandler->decrement(self::$key3, 5));
157-
$this->assertSame(0, $memcachedHandler->get(self::$key3));
157+
// Memcached stores counter values as decimal strings on the wire, so
158+
// a plain get() on a counter key returns a string, not an int.
159+
$this->assertSame('0', $memcachedHandler->get(self::$key3));
158160
}
159161

160162
public function testClean(): void

0 commit comments

Comments
 (0)