diff --git a/tests/Predis/Replication/ReplicationStrategyTest.php b/tests/Predis/Replication/ReplicationStrategyTest.php index f89ebf69..afba1521 100644 --- a/tests/Predis/Replication/ReplicationStrategyTest.php +++ b/tests/Predis/Replication/ReplicationStrategyTest.php @@ -29,7 +29,11 @@ class ReplicationStrategyTest extends PredisTestCase foreach ($this->getExpectedCommands('read') as $commandId) { $command = $profile->createCommand($commandId); - $this->assertTrue($strategy->isReadOperation($command)); + + $this->assertTrue( + $strategy->isReadOperation($command), + "$commandId is expected to be a read operation." + ); } } @@ -43,7 +47,11 @@ class ReplicationStrategyTest extends PredisTestCase foreach ($this->getExpectedCommands('write') as $commandId) { $command = $profile->createCommand($commandId); - $this->assertFalse($strategy->isReadOperation($command), $commandId); + + $this->assertFalse( + $strategy->isReadOperation($command), + "$commandId is expected to be a write operation." + ); } } @@ -57,7 +65,11 @@ class ReplicationStrategyTest extends PredisTestCase foreach ($this->getExpectedCommands('disallowed') as $commandId) { $command = $profile->createCommand($commandId); - $this->assertTrue($strategy->isDisallowedOperation($command), $commandId); + + $this->assertTrue( + $strategy->isDisallowedOperation($command), + "$commandId is expected to be a disallowed operation." + ); } } @@ -70,10 +82,16 @@ class ReplicationStrategyTest extends PredisTestCase $strategy = new ReplicationStrategy(); $cmdReadSort = $profile->createCommand('SORT', array('key:list')); - $this->assertTrue($strategy->isReadOperation($cmdReadSort), 'SORT [read-only]'); + $this->assertTrue( + $strategy->isReadOperation($cmdReadSort), + 'SORT is expected to be a read operation.' + ); $cmdWriteSort = $profile->createCommand('SORT', array('key:list', array('store' => 'key:stored'))); - $this->assertFalse($strategy->isReadOperation($cmdWriteSort), 'SORT [write with STORE]'); + $this->assertFalse( + $strategy->isReadOperation($cmdWriteSort), + 'SORT with STORE is expected to be a write operation.' + ); } /**