123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- <?php
- namespace Predis\Command;
- use \PHPUnit_Framework_TestCase as StandardTestCase;
- class ServerSlaveOfTest extends CommandTestCase
- {
-
- protected function getExpectedCommand()
- {
- return 'Predis\Command\ServerSlaveOf';
- }
-
- protected function getExpectedId()
- {
- return 'SLAVEOF';
- }
-
- public function testFilterArgumentsHostPortArray()
- {
- $arguments = array('127.0.0.1', '80');
- $expected = array('127.0.0.1', '80');
- $command = $this->getCommand();
- $command->setArguments($arguments);
- $this->assertSame($expected, $command->getArguments());
- }
-
- public function testFilterArgumentsNoOneArray()
- {
- $arguments = array('NO', 'ONE');
- $expected = array('NO', 'ONE');
- $command = $this->getCommand();
- $command->setArguments($arguments);
- $this->assertSame($expected, $command->getArguments());
- }
-
- public function testFilterArgumentsNoOneString()
- {
- $arguments = array('NO ONE');
- $expected = array('NO', 'ONE');
- $command = $this->getCommand();
- $command->setArguments($arguments);
- $this->assertSame($expected, $command->getArguments());
- }
-
- public function testParseResponse()
- {
- $this->assertTrue($this->getCommand()->parseResponse(true));
- }
- }
|