@@ -630,10 +630,7 @@ public function testGetVariationForFeatureExperimentGivenNullExperimentIds()
630
630
->method ('log ' )
631
631
->with (Logger::DEBUG , "The feature flag 'empty_feature' is not used in any experiments. " );
632
632
633
- $ this ->assertSame (
634
- null ,
635
- $ this ->decisionService ->getVariationForFeatureExperiment ($ feature_flag , 'user1 ' , [])
636
- );
633
+ $ this ->assertNull ($ this ->decisionService ->getVariationForFeatureExperiment ($ feature_flag , 'user1 ' , []));
637
634
}
638
635
639
636
// should return nil and log a message when the experiment is not in the datafile
@@ -655,10 +652,7 @@ public function testGetVariationForFeatureExperimentGivenExperimentNotInDataFile
655
652
"The user 'user1' is not bucketed into any of the experiments using the feature 'boolean_feature'. "
656
653
);
657
654
658
- $ this ->assertSame (
659
- null ,
660
- $ this ->decisionService ->getVariationForFeatureExperiment ($ feature_flag , 'user1 ' , [])
661
- );
655
+ $ this ->assertNull ($ this ->decisionService ->getVariationForFeatureExperiment ($ feature_flag , 'user1 ' , []));
662
656
}
663
657
664
658
// should return nil and log when the user is not bucketed into the feature flag's experiments
@@ -679,10 +673,7 @@ public function testGetVariationForFeatureExperimentGivenNonMutexGroupAndUserNot
679
673
"The user 'user1' is not bucketed into any of the experiments using the feature 'multi_variate_feature'. "
680
674
);
681
675
$ 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 ' , []));
686
677
}
687
678
688
679
// 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
755
746
Logger::INFO ,
756
747
"The user 'user_1' is not bucketed into any of the experiments using the feature 'boolean_feature'. "
757
748
);
758
- $ this ->assertEquals (
759
- null ,
760
- $ this ->decisionServiceMock ->getVariationForFeatureExperiment ($ feature_flag , 'user_1 ' , [])
761
- );
749
+ $ this ->assertNull ($ this ->decisionServiceMock ->getVariationForFeatureExperiment ($ feature_flag , 'user_1 ' , []));
762
750
}
763
751
764
752
// should return the bucketed experiment and variation
@@ -855,10 +843,7 @@ public function testGetVariationForFeatureWhenTheUserIsNeitherBucketedIntoFeatur
855
843
"User 'user_1' is not bucketed into rollout for feature flag 'string_single_variable_feature'. "
856
844
);
857
845
858
- $ this ->assertEquals (
859
- null ,
860
- $ decisionServiceMock ->getVariationForFeature ($ feature_flag , 'user_1 ' , [])
861
- );
846
+ $ this ->assertNull ($ decisionServiceMock ->getVariationForFeature ($ feature_flag , 'user_1 ' , []));
862
847
}
863
848
864
849
// should return null
@@ -874,10 +859,7 @@ public function testGetVariationForFeatureRolloutWhenNoRolloutIsAssociatedToFeat
874
859
"Feature flag 'boolean_feature' is not used in a rollout. "
875
860
);
876
861
877
- $ this ->assertEquals (
878
- null ,
879
- $ this ->decisionServiceMock ->getVariationForFeatureRollout ($ feature_flag , 'user_1 ' , [])
880
- );
862
+ $ this ->assertNull ($ this ->decisionServiceMock ->getVariationForFeatureRollout ($ feature_flag , 'user_1 ' , []));
881
863
}
882
864
883
865
// should return null
@@ -895,10 +877,7 @@ public function testGetVariationForFeatureRolloutWhenRolloutIsNotInDataFile()
895
877
'Rollout with ID "invalid_rollout_id" is not in the datafile. '
896
878
);
897
879
898
- $ this ->assertEquals (
899
- null ,
900
- $ this ->decisionServiceMock ->getVariationForFeatureRollout ($ feature_flag , 'user_1 ' , [])
901
- );
880
+ $ this ->assertNull ($ this ->decisionServiceMock ->getVariationForFeatureRollout ($ feature_flag , 'user_1 ' , []));
902
881
}
903
882
904
883
// should return null
@@ -922,10 +901,7 @@ public function testGetVariationForFeatureRolloutWhenRolloutDoesNotHaveExperimen
922
901
->method ('getRolloutFromId ' )
923
902
->will ($ this ->returnValue ($ experiment_less_rollout ));
924
903
925
- $ this ->assertEquals (
926
- null ,
927
- $ this ->decisionService ->getVariationForFeatureRollout ($ feature_flag , 'user_1 ' , [])
928
- );
904
+ $ this ->assertNull ($ this ->decisionService ->getVariationForFeatureRollout ($ feature_flag , 'user_1 ' , []));
929
905
}
930
906
931
907
// ============== when the user qualifies for targeting rule (audience match) ======================
@@ -1028,10 +1004,8 @@ public function testGetVariationForFeatureRolloutWhenUserIsNeitherBucketedInTheT
1028
1004
$ this ->loggerMock ->expects ($ this ->never ())
1029
1005
->method ('log ' );
1030
1006
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 ));
1035
1009
}
1036
1010
1037
1011
// ============== END of tests - when the user qualifies for targeting rule (audience match) ======================
0 commit comments