Skip to content

Commit b010100

Browse files
committed
Update tests
1 parent d230eb3 commit b010100

4 files changed

Lines changed: 19 additions & 4 deletions

File tree

tests/Clients/PHPMemTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ public function testDeleteKey(): void {
8484
* @throws MemcachedException
8585
*/
8686
public function testGetServerStats(): void {
87-
$stats = $this->phpmem->getServerStats();
88-
89-
$this->assertIsArray($stats);
90-
$this->assertArrayHasKey('version', $stats);
87+
$this->assertArrayHasKey('version', $this->phpmem->getServerStats());
9188
}
9289
}

tests/Clients/PredisTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,8 @@ public function testDelete(): void {
6060
$this->assertSame(0, $this->predis->exists('pu-pred-test-hash'));
6161
$this->assertSame(0, $this->predis->exists('pu-pred-test-stream'));
6262
}
63+
64+
public function testGetInfo(): void {
65+
$this->assertArrayHasKey('redis_version', $this->predis->getInfo('server'));
66+
}
6367
}

tests/Dashboards/MemcachedTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,11 @@ public function testSaveKey(): void {
135135

136136
$this->memcached->delete($key);
137137
}
138+
139+
/**
140+
* @throws MemcachedException
141+
*/
142+
public function testGetServerStats(): void {
143+
$this->assertArrayHasKey('version', $this->memcached->getServerStats());
144+
}
138145
}

tests/Dashboards/RedisTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,11 @@ public function testSaveKey(): void {
136136

137137
$this->redis->del($key);
138138
}
139+
140+
/**
141+
* @throws RedisException
142+
*/
143+
public function testGetInfo(): void {
144+
$this->assertArrayHasKey('redis_version', $this->redis->getInfo('server'));
145+
}
139146
}

0 commit comments

Comments
 (0)