15
15
16
16
final class EventTest extends MeasurementTestCase
17
17
{
18
- public function test_pageview ()
19
- {
20
- $ event = new Event \PageView ;
21
-
22
- $ this ->assertEventNaming ($ event );
23
- $ this ->assertEventFills ($ this ->populateEventByMethod (clone $ event ));
24
- $ this ->assertEventFills ($ this ->populateEventByArrayable (clone $ event ));
25
- $ this ->assertEventFills ($ this ->populateEventByFromArray (clone $ event ));
26
-
27
- $ this ->assertImportableByConvertHelper (
28
- [
29
- [ConvertHelper::camel ($ event ->getName ()) => $ this ->populateEventByFromArray (clone $ event )->toArray ()]
30
- ],
31
- $ event
32
- );
33
-
34
- $ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
35
- $ this ->assertNull ($ this ->analytics ->post ());
36
- }
37
-
38
18
public function test_addpaymentinfo ()
39
19
{
40
20
$ event = new Event \AddPaymentInfo ;
@@ -52,7 +32,7 @@ public function test_addpaymentinfo()
52
32
);
53
33
54
34
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
55
- $ this ->assertNull ( $ this -> analytics ->post () );
35
+ $ this ->analytics ->post ();
56
36
}
57
37
58
38
public function test_addshippinginfo ()
@@ -71,7 +51,7 @@ public function test_addshippinginfo()
71
51
);
72
52
73
53
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
74
- $ this ->assertNull ( $ this -> analytics ->post () );
54
+ $ this ->analytics ->post ();
75
55
}
76
56
77
57
public function test_addtocart ()
@@ -90,7 +70,7 @@ public function test_addtocart()
90
70
);
91
71
92
72
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
93
- $ this ->assertNull ( $ this -> analytics ->post () );
73
+ $ this ->analytics ->post ();
94
74
}
95
75
96
76
public function test_addtowishlist ()
@@ -109,7 +89,7 @@ public function test_addtowishlist()
109
89
);
110
90
111
91
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
112
- $ this ->assertNull ( $ this -> analytics ->post () );
92
+ $ this ->analytics ->post ();
113
93
}
114
94
115
95
public function test_begincheckout ()
@@ -128,7 +108,7 @@ public function test_begincheckout()
128
108
);
129
109
130
110
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
131
- $ this ->assertNull ( $ this -> analytics ->post () );
111
+ $ this ->analytics ->post ();
132
112
}
133
113
134
114
public function test_earnvirtualcurrency ()
@@ -147,7 +127,7 @@ public function test_earnvirtualcurrency()
147
127
);
148
128
149
129
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
150
- $ this ->assertNull ( $ this -> analytics ->post () );
130
+ $ this ->analytics ->post ();
151
131
}
152
132
153
133
public function test_generatelead ()
@@ -166,7 +146,7 @@ public function test_generatelead()
166
146
);
167
147
168
148
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
169
- $ this ->assertNull ( $ this -> analytics ->post () );
149
+ $ this ->analytics ->post ();
170
150
}
171
151
172
152
public function test_joingroup ()
@@ -185,7 +165,7 @@ public function test_joingroup()
185
165
);
186
166
187
167
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
188
- $ this ->assertNull ( $ this -> analytics ->post () );
168
+ $ this ->analytics ->post ();
189
169
}
190
170
191
171
public function test_levelup ()
@@ -205,7 +185,7 @@ public function test_levelup()
205
185
);
206
186
207
187
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
208
- $ this ->assertNull ( $ this -> analytics ->post () );
188
+ $ this ->analytics ->post ();
209
189
}
210
190
public function test_login ()
211
191
{
@@ -223,7 +203,7 @@ public function test_login()
223
203
);
224
204
225
205
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
226
- $ this ->assertNull ( $ this -> analytics ->post () );
206
+ $ this ->analytics ->post ();
227
207
}
228
208
229
209
public function test_postscore ()
@@ -242,7 +222,7 @@ public function test_postscore()
242
222
);
243
223
244
224
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
245
- $ this ->assertNull ( $ this -> analytics ->post () );
225
+ $ this ->analytics ->post ();
246
226
}
247
227
248
228
public function test_purchase ()
@@ -261,7 +241,7 @@ public function test_purchase()
261
241
);
262
242
263
243
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
264
- $ this ->assertNull ( $ this -> analytics ->post () );
244
+ $ this ->analytics ->post ();
265
245
}
266
246
267
247
public function test_refund ()
@@ -280,7 +260,7 @@ public function test_refund()
280
260
);
281
261
282
262
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
283
- $ this ->assertNull ( $ this -> analytics ->post () );
263
+ $ this ->analytics ->post ();
284
264
}
285
265
286
266
public function test_refund_full_succeeds_without_items ()
@@ -289,7 +269,7 @@ public function test_refund_full_succeeds_without_items()
289
269
290
270
$ this ->analytics ->addEvent ($ refund );
291
271
292
- $ this ->assertNull ( $ this -> analytics ->post () );
272
+ $ this ->analytics ->post ();
293
273
}
294
274
295
275
public function test_refund_partial_succeeds_with_items ()
@@ -333,7 +313,7 @@ public function test_removefromcart()
333
313
);
334
314
335
315
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
336
- $ this ->assertNull ( $ this -> analytics ->post () );
316
+ $ this ->analytics ->post ();
337
317
}
338
318
339
319
public function test_search ()
@@ -352,7 +332,7 @@ public function test_search()
352
332
);
353
333
354
334
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
355
- $ this ->assertNull ( $ this -> analytics ->post () );
335
+ $ this ->analytics ->post ();
356
336
}
357
337
358
338
public function test_selectcontent ()
@@ -371,7 +351,7 @@ public function test_selectcontent()
371
351
);
372
352
373
353
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
374
- $ this ->assertNull ( $ this -> analytics ->post () );
354
+ $ this ->analytics ->post ();
375
355
}
376
356
377
357
public function test_selectitem ()
@@ -390,7 +370,7 @@ public function test_selectitem()
390
370
);
391
371
392
372
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
393
- $ this ->assertNull ( $ this -> analytics ->post () );
373
+ $ this ->analytics ->post ();
394
374
}
395
375
396
376
public function test_selectpromotion ()
@@ -409,7 +389,7 @@ public function test_selectpromotion()
409
389
);
410
390
411
391
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
412
- $ this ->assertNull ( $ this -> analytics ->post () );
392
+ $ this ->analytics ->post ();
413
393
}
414
394
415
395
public function test_share ()
@@ -428,7 +408,7 @@ public function test_share()
428
408
);
429
409
430
410
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
431
- $ this ->assertNull ( $ this -> analytics ->post () );
411
+ $ this ->analytics ->post ();
432
412
}
433
413
434
414
public function test_signup ()
@@ -447,7 +427,7 @@ public function test_signup()
447
427
);
448
428
449
429
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
450
- $ this ->assertNull ( $ this -> analytics ->post () );
430
+ $ this ->analytics ->post ();
451
431
}
452
432
453
433
public function test_spendvirtualcurrency ()
@@ -466,7 +446,7 @@ public function test_spendvirtualcurrency()
466
446
);
467
447
468
448
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
469
- $ this ->assertNull ( $ this -> analytics ->post () );
449
+ $ this ->analytics ->post ();
470
450
}
471
451
472
452
public function test_tutorialbegin ()
@@ -485,7 +465,7 @@ public function test_tutorialbegin()
485
465
);
486
466
487
467
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
488
- $ this ->assertNull ( $ this -> analytics ->post () );
468
+ $ this ->analytics ->post ();
489
469
}
490
470
491
471
public function test_tutorialcomplete ()
@@ -504,7 +484,7 @@ public function test_tutorialcomplete()
504
484
);
505
485
506
486
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
507
- $ this ->assertNull ( $ this -> analytics ->post () );
487
+ $ this ->analytics ->post ();
508
488
}
509
489
510
490
public function test_unlockachievement ()
@@ -523,7 +503,7 @@ public function test_unlockachievement()
523
503
);
524
504
525
505
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
526
- $ this ->assertNull ( $ this -> analytics ->post () );
506
+ $ this ->analytics ->post ();
527
507
}
528
508
529
509
public function test_biewcart ()
@@ -542,7 +522,7 @@ public function test_biewcart()
542
522
);
543
523
544
524
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
545
- $ this ->assertNull ( $ this -> analytics ->post () );
525
+ $ this ->analytics ->post ();
546
526
}
547
527
548
528
public function test_viewitem ()
@@ -561,7 +541,7 @@ public function test_viewitem()
561
541
);
562
542
563
543
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
564
- $ this ->assertNull ( $ this -> analytics ->post () );
544
+ $ this ->analytics ->post ();
565
545
}
566
546
567
547
public function test_viewitemlist ()
@@ -580,7 +560,7 @@ public function test_viewitemlist()
580
560
);
581
561
582
562
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
583
- $ this ->assertNull ( $ this -> analytics ->post () );
563
+ $ this ->analytics ->post ();
584
564
}
585
565
586
566
public function test_viewpromotion ()
@@ -599,7 +579,7 @@ public function test_viewpromotion()
599
579
);
600
580
601
581
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
602
- $ this ->assertNull ( $ this -> analytics ->post () );
582
+ $ this ->analytics ->post ();
603
583
}
604
584
605
585
public function test_viewsearchresults ()
@@ -618,7 +598,7 @@ public function test_viewsearchresults()
618
598
);
619
599
620
600
$ this ->analytics ->addEvent ($ this ->populateEventByFromArray (clone $ event ));
621
- $ this ->assertNull ( $ this -> analytics ->post () );
601
+ $ this ->analytics ->post ();
622
602
}
623
603
624
604
public function test_throw_name_missing ()
0 commit comments