ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
GroupTest.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
3
5
9
10require_once('./libs/composer/vendor/autoload.php');
11require_once('./tests/Refinery/TestCase.php');
12
13class GroupTest extends TestCase
14{
18 private $group;
19
23 private $dataFactory;
24
28 private $language;
29
30 public function setUp() : void
31 {
32 $this->dataFactory = new Factory();
33 $this->language = $this->getMockBuilder('\ilLanguage')
34 ->disableOriginalConstructor()
35 ->getMock();
36
37 $this->group = new Group($this->dataFactory, $this->language);
38 }
39
40 public function testCustomConstraint()
41 {
42 $instance = $this->group->constraint(function () {
43 }, 'some error');
44 $this->assertInstanceOf(\ILIAS\Refinery\Custom\Constraint::class, $instance);
45 }
46
47 public function testCustomTransformation()
48 {
49 $instance = $this->group->transformation(function () {
50 });
51 $this->assertInstanceOf(\ILIAS\Refinery\Custom\Transformation::class, $instance);
52 }
53}
An exception for terminatinating execution or to throw for unit testing.
Builds data types.
Definition: Factory.php:20
language()
Definition: language.php:2
Class ChatMainBarProvider \MainMenu\Provider.