Definition at line 25 of file ChangeTimezoneTest.php.
◆ setUp()
ChangeTimezoneTest::setUp |
( |
| ) |
|
|
protected |
◆ testApplyToFail()
ChangeTimezoneTest::testApplyToFail |
( |
| ) |
|
Definition at line 102 of file ChangeTimezoneTest.php.
104 $trans = $this->dt->changeTimezone(
'Europe/London');
106 $ok = $df->ok(
'not_a_date');
108 $result = $trans->applyTo($ok);
109 $this->assertTrue($result->isError());
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ testApplyToOK()
ChangeTimezoneTest::testApplyToOK |
( |
| ) |
|
Definition at line 87 of file ChangeTimezoneTest.php.
89 $trans = $this->dt->changeTimezone(
'Europe/London');
90 $value =
'2019/05/26';
95 $ok = $df->ok($origin);
97 $result = $trans->applyTo($ok);
98 $this->assertEquals($expected, $result->value());
99 $this->assertFalse($result->isError());
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
◆ testInvalidTransform()
ChangeTimezoneTest::testInvalidTransform |
( |
| ) |
|
Definition at line 69 of file ChangeTimezoneTest.php.
71 $this->expectException(InvalidArgumentException::class);
72 $trans = $this->dt->changeTimezone(
'Europe/Berlin');
73 $trans->transform(
'erroneous');
◆ testInvoke()
ChangeTimezoneTest::testInvoke |
( |
| ) |
|
Definition at line 76 of file ChangeTimezoneTest.php.
78 $dat =
'2019/05/26 16:05:22';
79 $origin_tz =
'Europe/Berlin';
80 $target_tz =
'Europe/London';
83 $trans = $this->dt->changeTimezone($target_tz);
84 $this->assertEquals($expected, $trans($origin));
◆ testNullTransform()
ChangeTimezoneTest::testNullTransform |
( |
| ) |
|
Definition at line 62 of file ChangeTimezoneTest.php.
References null.
64 $trans = $this->dt->changeTimezone(
'Europe/Berlin');
65 $this->expectException(InvalidArgumentException::class);
66 $trans->transform(
null);
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
◆ testTransform()
ChangeTimezoneTest::testTransform |
( |
| ) |
|
Definition at line 34 of file ChangeTimezoneTest.php.
36 $dat =
'2019-05-26 13:15:01';
37 $origin_tz =
'Europe/Berlin';
38 $target_tz =
'Europe/London';
41 $trans = $this->dt->changeTimezone($target_tz);
45 $trans->transform($origin)
◆ testTransformValues()
ChangeTimezoneTest::testTransformValues |
( |
| ) |
|
Definition at line 49 of file ChangeTimezoneTest.php.
51 $dat =
'2019-05-26 13:15:01';
52 $origin_tz =
'Europe/Berlin';
53 $target_tz =
'America/El_Salvador';
55 $trans = $this->dt->changeTimezone($target_tz);
58 date_format($trans->transform($origin),
'Y-m-d H:i:s')
◆ $dt
DateTime Group ChangeTimezoneTest::$dt |
|
private |
The documentation for this class was generated from the following file: