@@ -630,10 +630,7 @@ public function testGetVariationForFeatureExperimentGivenNullExperimentIds()
630630 ->method ('log ' )
631631 ->with (Logger::DEBUG , "The feature flag 'empty_feature' is not used in any experiments. " );
632632
633- $ this ->assertSame (
634- null ,
635- $ this ->decisionService ->getVariationForFeatureExperiment ($ feature_flag , 'user1 ' , [])
636- );
633+ $ this ->assertNull ($ this ->decisionService ->getVariationForFeatureExperiment ($ feature_flag , 'user1 ' , []));
637634 }
638635
639636 // should return nil and log a message when the experiment is not in the datafile
@@ -655,10 +652,7 @@ public function testGetVariationForFeatureExperimentGivenExperimentNotInDataFile
655652 "The user 'user1' is not bucketed into any of the experiments using the feature 'boolean_feature'. "
656653 );
657654
658- $ this ->assertSame (
659- null ,
660- $ this ->decisionService ->getVariationForFeatureExperiment ($ feature_flag , 'user1 ' , [])
661- );
655+ $ this ->assertNull ($ this ->decisionService ->getVariationForFeatureExperiment ($ feature_flag , 'user1 ' , []));
662656 }
663657
664658 // should return nil and log when the user is not bucketed into the feature flag's experiments
@@ -679,10 +673,7 @@ public function testGetVariationForFeatureExperimentGivenNonMutexGroupAndUserNot
679673 "The user 'user1' is not bucketed into any of the experiments using the feature 'multi_variate_feature'. "
680674 );
681675 $ feature_flag = $ this ->config ->getFeatureFlagFromKey ('multi_variate_feature ' );
682- $ this ->assertSame (
683- null ,
684- $ this ->decisionServiceMock ->getVariationForFeatureExperiment ($ feature_flag , 'user1 ' , [])
685- );
676+ $ this ->assertNull ($ this ->decisionServiceMock ->getVariationForFeatureExperiment ($ feature_flag , 'user1 ' , []));
686677 }
687678
688679 // should return the variation when the user is bucketed into a variation for the experiment on the feature flag
@@ -755,10 +746,7 @@ public function testGetVariationForFeatureExperimentGivenMutexGroupAndUserNotBuc
755746 Logger::INFO ,
756747 "The user 'user_1' is not bucketed into any of the experiments using the feature 'boolean_feature'. "
757748 );
758- $ this ->assertEquals (
759- null ,
760- $ this ->decisionServiceMock ->getVariationForFeatureExperiment ($ feature_flag , 'user_1 ' , [])
761- );
749+ $ this ->assertNull ($ this ->decisionServiceMock ->getVariationForFeatureExperiment ($ feature_flag , 'user_1 ' , []));
762750 }
763751
764752 // should return the bucketed experiment and variation
@@ -855,10 +843,7 @@ public function testGetVariationForFeatureWhenTheUserIsNeitherBucketedIntoFeatur
855843 "User 'user_1' is not bucketed into rollout for feature flag 'string_single_variable_feature'. "
856844 );
857845
858- $ this ->assertEquals (
859- null ,
860- $ decisionServiceMock ->getVariationForFeature ($ feature_flag , 'user_1 ' , [])
861- );
846+ $ this ->assertNull ($ decisionServiceMock ->getVariationForFeature ($ feature_flag , 'user_1 ' , []));
862847 }
863848
864849 // should return null
@@ -874,10 +859,7 @@ public function testGetVariationForFeatureRolloutWhenNoRolloutIsAssociatedToFeat
874859 "Feature flag 'boolean_feature' is not used in a rollout. "
875860 );
876861
877- $ this ->assertEquals (
878- null ,
879- $ this ->decisionServiceMock ->getVariationForFeatureRollout ($ feature_flag , 'user_1 ' , [])
880- );
862+ $ this ->assertNull ($ this ->decisionServiceMock ->getVariationForFeatureRollout ($ feature_flag , 'user_1 ' , []));
881863 }
882864
883865 // should return null
@@ -895,10 +877,7 @@ public function testGetVariationForFeatureRolloutWhenRolloutIsNotInDataFile()
895877 'Rollout with ID "invalid_rollout_id" is not in the datafile. '
896878 );
897879
898- $ this ->assertEquals (
899- null ,
900- $ this ->decisionServiceMock ->getVariationForFeatureRollout ($ feature_flag , 'user_1 ' , [])
901- );
880+ $ this ->assertNull ($ this ->decisionServiceMock ->getVariationForFeatureRollout ($ feature_flag , 'user_1 ' , []));
902881 }
903882
904883 // should return null
@@ -922,10 +901,7 @@ public function testGetVariationForFeatureRolloutWhenRolloutDoesNotHaveExperimen
922901 ->method ('getRolloutFromId ' )
923902 ->will ($ this ->returnValue ($ experiment_less_rollout ));
924903
925- $ this ->assertEquals (
926- null ,
927- $ this ->decisionService ->getVariationForFeatureRollout ($ feature_flag , 'user_1 ' , [])
928- );
904+ $ this ->assertNull ($ this ->decisionService ->getVariationForFeatureRollout ($ feature_flag , 'user_1 ' , []));
929905 }
930906
931907 // ============== when the user qualifies for targeting rule (audience match) ======================
@@ -1028,10 +1004,8 @@ public function testGetVariationForFeatureRolloutWhenUserIsNeitherBucketedInTheT
10281004 $ this ->loggerMock ->expects ($ this ->never ())
10291005 ->method ('log ' );
10301006
1031- $ this ->assertEquals (
1032- null ,
1033- $ this ->decisionService ->getVariationForFeatureRollout ($ feature_flag , 'user_1 ' , $ user_attributes )
1034- );
1007+ $ this ->assertNull (
1008+ $ this ->decisionService ->getVariationForFeatureRollout ($ feature_flag , 'user_1 ' , $ user_attributes ));
10351009 }
10361010
10371011 // ============== END of tests - when the user qualifies for targeting rule (audience match) ======================
0 commit comments