Simplify Predis\Profiles\ServerProfile::defineCommand().

This commit is contained in:
Daniele Alessandri
2011-04-04 15:03:14 +02:00
parent bfa9cc7469
commit da2cd3ee7e
3 changed files with 6 additions and 15 deletions
+1 -1
View File
@@ -153,7 +153,7 @@ class ClientFeaturesTestSuite extends PHPUnit_Framework_TestCase {
$cmdClass = '\Predis\Commands\Multi';
$this->assertFalse($profile->supportsCommand($cmdId));
$profile->defineCommand(new $cmdClass(), $cmdId);
$profile->defineCommand($cmdId, new $cmdClass());
$this->assertTrue($profile->supportsCommand($cmdId));
$this->assertInstanceOf($cmdClass, $profile->createCommand($cmdId));
}