@@ -96,7 +96,8 @@ public function testOptimizelyFeatureEntity()
96
96
97
97
$ this ->assertEquals ("id " , $ optFeature ->getId ());
98
98
$ this ->assertEquals ("key " , $ optFeature ->getKey ());
99
- $ this ->assertEquals (["a " => "apple " ], $ optFeature ->getExperimentsMap ());
99
+ # Suppressing warning in getExperimentMap to pass testcase
100
+ $ this ->assertEquals (["a " => "apple " ], @$ optFeature ->getExperimentsMap ());
100
101
$ this ->assertEquals (["o " => "orange " ], $ optFeature ->getVariablesMap ());
101
102
$ this ->assertEquals ([], $ optFeature ->getExperimentRules ());
102
103
$ this ->assertEquals ([], $ optFeature ->getDeliveryRules ());
@@ -115,6 +116,26 @@ public function testOptimizelyFeatureEntity()
115
116
$ this ->assertEquals ($ expectedJson , json_encode ($ optFeature ));
116
117
}
117
118
119
+ /**
120
+ * @expectedException PHPUnit_Framework_Error
121
+ */
122
+ public function testOptimizelyFeatureGetExperimentsMapEmitsWarning ()
123
+ {
124
+ $ optFeature = new OptimizelyFeature (
125
+ "id " ,
126
+ "key " ,
127
+ ["a " => "apple " ],
128
+ ["o " => "orange " ],
129
+ [],
130
+ []
131
+ );
132
+
133
+ $ this ->assertEquals ("id " , $ optFeature ->getId ());
134
+ $ this ->assertEquals ("key " , $ optFeature ->getKey ());
135
+
136
+ $ this ->assertEquals (["a " => "apple " ], $ optFeature ->getExperimentsMap ());
137
+ }
138
+
118
139
public function testOptimizelyVariableEntity ()
119
140
{
120
141
$ optVariable = new OptimizelyVariable (
0 commit comments