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
11
12require_once('./libs/composer/vendor/autoload.php');
13
14class GroupTest extends TestCase
15{
19 private $group;
20
21 public function setUp() : void
22 {
23 $dataFactory = new Factory();
24 $language = $this->getMockBuilder('\ilLanguage')
25 ->disableOriginalConstructor()
26 ->getMock();
27
28 $this->group = new Group($dataFactory, $language);
29 }
30
31 public function testGreaterThanInstance()
32 {
33 $instance = $this->group->hasMaxLength(42);
34 $this->assertInstanceOf(HasMaxLength::class, $instance);
35 }
36 public function testLowerThanInstance()
37 {
38 $instance = $this->group->hasMinLength(42);
39 $this->assertInstanceOf(HasMinLength::class, $instance);
40 }
41}
An exception for terminatinating execution or to throw for unit testing.
Builds data types.
Definition: Factory.php:20