11<?php
22/**
3- * Copyright 2016-2017 , Optimizely
3+ * Copyright 2016-2018 , Optimizely
44 *
55 * Licensed under the Apache License, Version 2.0 (the "License");
66 * you may not use this file except in compliance with the License.
@@ -107,8 +107,7 @@ public function testBucketValidExperimentNotInGroup()
107107 ->method ('log ' )
108108 ->with (Logger::INFO , 'User "testUserId" is in no variation. ' );
109109
110- $ this ->assertEquals (
111- new Variation (),
110+ $ this ->assertNull (
112111 $ bucketer ->bucket (
113112 $ this ->config ,
114113 $ this ->config ->getExperimentFromKey ('test_experiment ' ),
@@ -167,8 +166,7 @@ public function testBucketValidExperimentNotInGroup()
167166 ->method ('log ' )
168167 ->with (Logger::INFO , 'User "testUserId" is in no variation. ' );
169168
170- $ this ->assertEquals (
171- new Variation (),
169+ $ this ->assertNull (
172170 $ bucketer ->bucket (
173171 $ this ->config ,
174172 $ this ->config ->getExperimentFromKey ('test_experiment ' ),
@@ -271,8 +269,7 @@ public function testBucketValidExperimentInGroup()
271269 ->method ('log ' )
272270 ->with (Logger::INFO , 'User "testUserId" is not in experiment group_experiment_1 of group 7722400015. ' );
273271
274- $ this ->assertEquals (
275- new Variation (),
272+ $ this ->assertNull (
276273 $ bucketer ->bucket (
277274 $ this ->config ,
278275 $ this ->config ->getExperimentFromKey ('group_experiment_1 ' ),
@@ -290,8 +287,7 @@ public function testBucketValidExperimentInGroup()
290287 ->method ('log ' )
291288 ->with (Logger::INFO , 'User "testUserId" is in no experiment. ' );
292289
293- $ this ->assertEquals (
294- new Variation (),
290+ $ this ->assertNull (
295291 $ bucketer ->bucket (
296292 $ this ->config ,
297293 $ this ->config ->getExperimentFromKey ('group_experiment_1 ' ),
@@ -308,8 +304,7 @@ public function testBucketValidExperimentInGroup()
308304 $ this ->loggerMock ->expects ($ this ->at (1 ))
309305 ->method ('log ' )
310306 ->with (Logger::INFO , 'User "testUserId" is in no experiment. ' );
311- $ this ->assertEquals (
312- new Variation (),
307+ $ this ->assertNull (
313308 $ bucketer ->bucket (
314309 $ this ->config ,
315310 $ this ->config ->getExperimentFromKey ('group_experiment_1 ' ),
@@ -325,8 +320,7 @@ public function testBucketInvalidExperiment()
325320 $ this ->loggerMock ->expects ($ this ->never ())
326321 ->method ('log ' );
327322
328- $ this ->assertEquals (
329- new Variation (),
323+ $ this ->assertNull (
330324 $ bucketer ->bucket ($ this ->config , new Experiment (), $ this ->testBucketingIdControl , $ this ->testUserId )
331325 );
332326 }
@@ -356,8 +350,7 @@ public function testBucketVariationInvalidExperimentsWithBucketingId()
356350 $ bucketer = new TestBucketer ($ this ->loggerMock );
357351 $ bucketer ->setBucketValues ([1000 , 3000 , 7000 , 9000 ]);
358352
359- $ this ->assertEquals (
360- new Variation (),
353+ $ this ->assertNull (
361354 $ bucketer ->bucket (
362355 $ this ->config ,
363356 $ this ->config ->getExperimentFromKey ('invalid_experiment ' ),
@@ -430,8 +423,7 @@ public function testBucketWithRolloutRule()
430423 )
431424 );
432425
433- $ this ->assertEquals (
434- new Variation (),
426+ $ this ->assertNull (
435427 $ bucketer ->bucket (
436428 $ this ->config ,
437429 $ rollout_rule ,
0 commit comments