@@ -31,14 +31,14 @@ class OptimizelyTest extends \PHPUnit_Framework_TestCase
31
31
{
32
32
private $ datafile ;
33
33
private $ eventBuilderMock ;
34
- private $ optObj ;
34
+ private $ optimizelyObject ;
35
35
private $ projectConfig ;
36
36
37
37
public function setUp ()
38
38
{
39
39
$ this ->datafile = DATAFILE ;
40
40
$ this ->projectConfig = new ProjectConfig ($ this ->datafile );
41
- $ this ->optObj = new Optimizely ($ this ->datafile );
41
+ $ this ->optimizelyObject = new Optimizely ($ this ->datafile );
42
42
43
43
// Mock EventBuilder
44
44
$ this ->eventBuilderMock = $ this ->getMockBuilder (EventBuilder::class)
@@ -152,7 +152,7 @@ public function testValidatePreconditionsExperimentNotRunning()
152
152
153
153
$ this ->assertFalse (
154
154
$ validatePreconditions ->invoke (
155
- $ this ->optObj ,
155
+ $ this ->optimizelyObject ,
156
156
$ this ->projectConfig ->getExperimentFromKey ('paused_experiment ' ),
157
157
'test_user ' ,
158
158
[])
@@ -166,7 +166,7 @@ public function testValidatePreconditionsExperimentRunning()
166
166
167
167
$ this ->assertTrue (
168
168
$ validatePreconditions ->invoke (
169
- $ this ->optObj ,
169
+ $ this ->optimizelyObject ,
170
170
$ this ->projectConfig ->getExperimentFromKey ('test_experiment ' ),
171
171
'test_user ' ,
172
172
[])
@@ -180,7 +180,7 @@ public function testValidatePreconditionsUserInForcedVariationNotInExperiment()
180
180
181
181
$ this ->assertTrue (
182
182
$ validatePreconditions ->invoke (
183
- $ this ->optObj ,
183
+ $ this ->optimizelyObject ,
184
184
$ this ->projectConfig ->getExperimentFromKey ('test_experiment ' ),
185
185
'user_1 ' ,
186
186
[])
@@ -194,7 +194,7 @@ public function testValidatePreconditionsUserInForcedVariationInExperiment()
194
194
195
195
$ this ->assertTrue (
196
196
$ validatePreconditions ->invoke (
197
- $ this ->optObj ,
197
+ $ this ->optimizelyObject ,
198
198
$ this ->projectConfig ->getExperimentFromKey ('test_experiment ' ),
199
199
'user1 ' ,
200
200
[])
@@ -209,7 +209,7 @@ public function testValidatePreconditionsUserNotInForcedVariationNotInExperiment
209
209
// Will get updated when we have audience evaluation and user does not meet conditions
210
210
$ this ->assertTrue (
211
211
$ validatePreconditions ->invoke (
212
- $ this ->optObj ,
212
+ $ this ->optimizelyObject ,
213
213
$ this ->projectConfig ->getExperimentFromKey ('test_experiment ' ),
214
214
'test_user ' ,
215
215
[])
@@ -224,7 +224,7 @@ public function testValidatePreconditionsUserNotInForcedVariationInExperiment()
224
224
// Will get updated when we have audience evaluation and user does meets conditions
225
225
$ this ->assertTrue (
226
226
$ validatePreconditions ->invoke (
227
- $ this ->optObj ,
227
+ $ this ->optimizelyObject ,
228
228
$ this ->projectConfig ->getExperimentFromKey ('test_experiment ' ),
229
229
'test_user ' ,
230
230
[])
@@ -296,12 +296,12 @@ public function testActivateExperimentNotRunning()
296
296
297
297
public function testGetVariation ()
298
298
{
299
- $ this ->assertEquals ('control ' , $ this ->optObj ->getVariation ('test_experiment ' , 'test_user ' ));
299
+ $ this ->assertEquals ('control ' , $ this ->optimizelyObject ->getVariation ('test_experiment ' , 'test_user ' ));
300
300
}
301
301
302
302
public function testGetVariationExperimentNotRunning ()
303
303
{
304
- $ this ->assertNull ($ this ->optObj ->getVariation ('paused_experiment ' , 'test_user ' ));
304
+ $ this ->assertNull ($ this ->optimizelyObject ->getVariation ('paused_experiment ' , 'test_user ' ));
305
305
}
306
306
307
307
public function testTrackNoAttributesNoEventValue ()
0 commit comments