@@ -236,13 +236,27 @@ public function test_sentinelMasterName_ShouldTrimTheGivenValue_IfNotEmpty()
236236 $ this ->assertSame ('test ' , $ this ->settings ->sentinelMasterName ->getValue ());
237237 }
238238
239- public function test_useSentinelBackend ()
239+ public function test_useWhatRedisBackendType ()
240240 {
241- $ this ->settings ->useSentinelBackend ->setValue ('0 ' );
242- $ this ->assertFalse ($ this ->settings ->useSentinelBackend ->getValue ());
241+ $ this ->settings ->useWhatRedisBackendType ->setValue (1 );
242+ $ this ->assertFalse ($ this ->settings ->isUsingSentinelBackend ());
243+
244+ $ this ->settings ->useWhatRedisBackendType ->setValue (3 );
245+ $ this ->assertFalse ($ this ->settings ->isUsingSentinelBackend ());
246+
247+ $ this ->settings ->useWhatRedisBackendType ->setValue (2 );
248+ $ this ->assertTrue ($ this ->settings ->isUsingSentinelBackend ());
249+ }
250+
251+ public function testIsUsingClusterBackend ()
252+ {
253+ $ this ->settings ->useWhatRedisBackendType ->setValue (1 );
254+ $ this ->assertFalse ($ this ->settings ->isUsingClusterBackend ());
255+ $ this ->settings ->useWhatRedisBackendType ->setValue (2 );
256+ $ this ->assertFalse ($ this ->settings ->isUsingClusterBackend ());
243257
244- $ this ->settings ->useSentinelBackend ->setValue (' 1 ' );
245- $ this ->assertTrue ($ this ->settings ->useSentinelBackend -> getValue ());
258+ $ this ->settings ->useWhatRedisBackendType ->setValue (3 );
259+ $ this ->assertTrue ($ this ->settings ->isUsingClusterBackend ());
246260 }
247261
248262 public function test_redisPort_ShouldFailWhenMultipleValuesGiven_IfSentinelNotEnabled ()
@@ -290,9 +304,9 @@ public function test_queueEnabled_ShouldBeDisabledByDefault()
290304 $ this ->assertFalse ($ this ->settings ->queueEnabled ->getValue ());
291305 }
292306
293- public function test_useSentinelBackend_ShouldBeDisabledByDefault ()
307+ public function test_useWhatRedisBackendType_ShouldBe1Default ()
294308 {
295- $ this ->assertFalse ( $ this ->settings ->useSentinelBackend ->getValue ());
309+ $ this ->assertSame ( 1 , $ this ->settings ->useWhatRedisBackendType ->getValue ());
296310 }
297311
298312 public function test_sentinelMasterName_shouldHaveValueByDefault ()
0 commit comments