ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
GroupTest.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
6
11
12require_once('./libs/composer/vendor/autoload.php');
13require_once('./tests/Refinery/TestCase.php');
14
15class GroupTest extends TestCase
16{
20 private $group;
21
25 private $dataFactory;
26
27 public function setUp() : void
28 {
29 $this->dataFactory = new Factory();
30 $this->group = new Group($this->dataFactory);
31 }
32
33 public function testChangeTimezone()
34 {
35 $instance = $this->group->changeTimezone('Europe/Berlin');
36 $this->assertInstanceOf(ChangeTimezone::class, $instance);
37 }
38
40 {
41 $this->expectException(\InvalidArgumentException::class);
42 $instance = $this->group->changeTimezone('MiddleEarth/Minas_Morgul');
43 }
44}
An exception for terminatinating execution or to throw for unit testing.
Builds data types.
Definition: Factory.php:20
Change the timezone (and only the timezone) of php's \DateTimeImmutable WITHOUT changing the date-val...