@@ -31,14 +31,14 @@ class OptimizelyTest extends \PHPUnit_Framework_TestCase
3131{
3232 private $ datafile ;
3333 private $ eventBuilderMock ;
34- private $ optObj ;
34+ private $ optimizelyObject ;
3535 private $ projectConfig ;
3636
3737 public function setUp ()
3838 {
3939 $ this ->datafile = DATAFILE ;
4040 $ this ->projectConfig = new ProjectConfig ($ this ->datafile );
41- $ this ->optObj = new Optimizely ($ this ->datafile );
41+ $ this ->optimizelyObject = new Optimizely ($ this ->datafile );
4242
4343 // Mock EventBuilder
4444 $ this ->eventBuilderMock = $ this ->getMockBuilder (EventBuilder::class)
@@ -152,7 +152,7 @@ public function testValidatePreconditionsExperimentNotRunning()
152152
153153 $ this ->assertFalse (
154154 $ validatePreconditions ->invoke (
155- $ this ->optObj ,
155+ $ this ->optimizelyObject ,
156156 $ this ->projectConfig ->getExperimentFromKey ('paused_experiment ' ),
157157 'test_user ' ,
158158 [])
@@ -166,7 +166,7 @@ public function testValidatePreconditionsExperimentRunning()
166166
167167 $ this ->assertTrue (
168168 $ validatePreconditions ->invoke (
169- $ this ->optObj ,
169+ $ this ->optimizelyObject ,
170170 $ this ->projectConfig ->getExperimentFromKey ('test_experiment ' ),
171171 'test_user ' ,
172172 [])
@@ -180,7 +180,7 @@ public function testValidatePreconditionsUserInForcedVariationNotInExperiment()
180180
181181 $ this ->assertTrue (
182182 $ validatePreconditions ->invoke (
183- $ this ->optObj ,
183+ $ this ->optimizelyObject ,
184184 $ this ->projectConfig ->getExperimentFromKey ('test_experiment ' ),
185185 'user_1 ' ,
186186 [])
@@ -194,7 +194,7 @@ public function testValidatePreconditionsUserInForcedVariationInExperiment()
194194
195195 $ this ->assertTrue (
196196 $ validatePreconditions ->invoke (
197- $ this ->optObj ,
197+ $ this ->optimizelyObject ,
198198 $ this ->projectConfig ->getExperimentFromKey ('test_experiment ' ),
199199 'user1 ' ,
200200 [])
@@ -209,7 +209,7 @@ public function testValidatePreconditionsUserNotInForcedVariationNotInExperiment
209209 // Will get updated when we have audience evaluation and user does not meet conditions
210210 $ this ->assertTrue (
211211 $ validatePreconditions ->invoke (
212- $ this ->optObj ,
212+ $ this ->optimizelyObject ,
213213 $ this ->projectConfig ->getExperimentFromKey ('test_experiment ' ),
214214 'test_user ' ,
215215 [])
@@ -224,7 +224,7 @@ public function testValidatePreconditionsUserNotInForcedVariationInExperiment()
224224 // Will get updated when we have audience evaluation and user does meets conditions
225225 $ this ->assertTrue (
226226 $ validatePreconditions ->invoke (
227- $ this ->optObj ,
227+ $ this ->optimizelyObject ,
228228 $ this ->projectConfig ->getExperimentFromKey ('test_experiment ' ),
229229 'test_user ' ,
230230 [])
@@ -296,12 +296,12 @@ public function testActivateExperimentNotRunning()
296296
297297 public function testGetVariation ()
298298 {
299- $ this ->assertEquals ('control ' , $ this ->optObj ->getVariation ('test_experiment ' , 'test_user ' ));
299+ $ this ->assertEquals ('control ' , $ this ->optimizelyObject ->getVariation ('test_experiment ' , 'test_user ' ));
300300 }
301301
302302 public function testGetVariationExperimentNotRunning ()
303303 {
304- $ this ->assertNull ($ this ->optObj ->getVariation ('paused_experiment ' , 'test_user ' ));
304+ $ this ->assertNull ($ this ->optimizelyObject ->getVariation ('paused_experiment ' , 'test_user ' ));
305305 }
306306
307307 public function testTrackNoAttributesNoEventValue ()
0 commit comments