1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- <?php
- namespace Predis\Command;
- class ServerDatabaseSizeTest extends PredisCommandTestCase
- {
-
- protected function getExpectedCommand()
- {
- return 'Predis\Command\ServerDatabaseSize';
- }
-
- protected function getExpectedId()
- {
- return 'DBSIZE';
- }
-
- public function testFilterArguments()
- {
- $command = $this->getCommand();
- $command->setArguments(array());
- $this->assertSame(array(), $command->getArguments());
- }
-
- public function testParseResponse()
- {
- $this->assertSame(100, $this->getCommand()->parseResponse(100));
- }
-
- public function testReturnsCurrentSizeOfDatabase()
- {
- $redis = $this->getClient();
- $redis->set('foo', 'bar');
- $this->assertGreaterThan(0, $redis->dbsize());
- }
- }
|