ILIAS  release_7 Revision v7.30-3-g800a261c036
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
10
11require_once('./libs/composer/vendor/autoload.php');
12require_once('./tests/Refinery/TestCase.php');
13
14class GroupTest extends TestCase
15{
19 private $group;
20
24 private $dataFactory;
25
29 private $language;
30
31 public function setUp() : void
32 {
33 $this->dataFactory = new Factory();
34 $this->language = $this->getMockBuilder('\ilLanguage')
35 ->disableOriginalConstructor()
36 ->getMock();
37
38 $this->group = new Group($this->dataFactory);
39 }
40
41 public function testCustomConstraint()
42 {
43 $instance = $this->group->addLabels(array('hello', 'world'));
44 $this->assertInstanceOf(AddLabels::class, $instance);
45 }
46}
An exception for terminatinating execution or to throw for unit testing.
Builds data types.
Definition: Factory.php:20
Adds to any array keys for each value.
Definition: AddLabels.php:15
language()
Definition: language.php:2