@@ -55,7 +55,7 @@ public function testAddYaml(): void
55
55
id: practice
56
56
formal_name: NWERC 2020 Practice Session
57
57
name: practice
58
- activation_time : '2021-03-27T09:00:00+00:00'
58
+ activate_time : '2021-03-27T09:00:00+00:00'
59
59
start_time: '2021-03-27T09:00:00+00:00'
60
60
end_time: '2021-03-27T11:00:00+00:00'
61
61
duration: 2:00:00.000
@@ -244,9 +244,9 @@ public function provideChangeTimes(): Generator
244
244
/**
245
245
* @dataProvider provideNewContest
246
246
*/
247
- public function testActivationTimeContestYaml (
248
- string $ activationTime , string $ startTime , ?string $ deactivationTime ,
249
- bool $ setActivation , bool $ setDeactivation
247
+ public function testActivateTimeContestYaml (
248
+ string $ activateTime , string $ startTime , ?string $ deactivateTime ,
249
+ bool $ setActivate , bool $ setDeactivate
250
250
): void {
251
251
$ yaml = <<<EOF
252
252
duration: 2:00:00
@@ -262,11 +262,11 @@ public function testActivationTimeContestYaml(
262
262
id: anothereruption
263
263
EOF ;
264
264
265
- if ($ setActivation ) {
266
- $ yaml = "activation_time : " .$ activationTime ."\n" .$ yaml ;
265
+ if ($ setActivate ) {
266
+ $ yaml = "activate_time : " .$ activateTime ."\n" .$ yaml ;
267
267
}
268
- if ($ setDeactivation ) {
269
- $ yaml = "deactivation_time : " .$ deactivationTime ."\n" .$ yaml ;
268
+ if ($ setDeactivate ) {
269
+ $ yaml = "deactivate_time : " .$ deactivateTime ."\n" .$ yaml ;
270
270
}
271
271
$ url = $ this ->helperGetEndpointURL ($ this ->apiEndpoint );
272
272
$ tempYamlFile = tempnam (sys_get_temp_dir (), "/contest-yaml- " );
@@ -278,16 +278,16 @@ public function testActivationTimeContestYaml(
278
278
279
279
$ now = Utils::now ();
280
280
$ nowTime = Utils::printtime ($ now , 'Y-m-d H:i:s ' );
281
- $ activation = Utils::toEpochFloat ($ activationTime );
281
+ $ activate = Utils::toEpochFloat ($ activateTime );
282
282
$ start = Utils::toEpochFloat ($ startTime );
283
-
283
+
284
284
self ::assertIsString ($ cid );
285
285
self ::assertSame ('New Contest to check Activation ' , $ this ->getContest ($ cid )->getName ());
286
286
self ::assertSame ($ start , $ this ->getContest ($ cid )->getStarttime ());
287
287
288
- if ($ setActivation ) {
289
- self ::assertSame ($ activationTime , Utils::printtime ($ this ->getContest ($ cid )->getActivatetime (), 'Y-m-d H:i:s ' ));
290
- self ::assertSame ($ activation , $ this ->getContest ($ cid )->getActivatetime ());
288
+ if ($ setActivate ) {
289
+ self ::assertSame ($ activateTime , Utils::printtime ($ this ->getContest ($ cid )->getActivatetime (), 'Y-m-d H:i:s ' ));
290
+ self ::assertSame ($ activate , $ this ->getContest ($ cid )->getActivatetime ());
291
291
} else {
292
292
// Contest uploaded starts in the past
293
293
if (Utils::printtime (Utils::now (), 'Y-m-d H:i:s ' )>=$ startTime ) {
@@ -296,8 +296,8 @@ public function testActivationTimeContestYaml(
296
296
self ::assertTrue ($ this ->getContest ($ cid )->getActivatetime () <= $ now );
297
297
}
298
298
}
299
- if ($ deactivationTime ) {
300
- self ::assertSame ($ deactivationTime , Utils::printtime ($ this ->getContest ($ cid )->getDeactivatetime (), 'Y-m-d H:i:s ' ));
299
+ if ($ deactivateTime ) {
300
+ self ::assertSame ($ deactivateTime , Utils::printtime ($ this ->getContest ($ cid )->getDeactivatetime (), 'Y-m-d H:i:s ' ));
301
301
} else {
302
302
self ::assertNull ($ this ->getContest ($ cid )->getDeactivatetime ());
303
303
}
0 commit comments