/**
* @group disconnected
*/
public function testCanUseCallableToCheckCommand()
{
$strategy = new ReplicationStrategy();
$profile = ServerProfile::getDevelopment();
$strategy->setCommandReadOnly('SET', function ($command) {
return $command->getArgument(1) === true;
});
$command = $profile->createCommand('SET', array('trigger', false));
$this->assertFalse($strategy->isReadOperation($command));
$command = $profile->createCommand('SET', array('trigger', true));
$this->assertTrue($strategy->isReadOperation($command));
}