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
14
15require_once('./libs/composer/vendor/autoload.php');
16
17class GroupTest extends TestCase
18{
22 private $group;
23
27 private $dataFactory;
28
32 private $language;
33
34 public function setUp() : void
35 {
36 $this->dataFactory = new Factory();
37 $this->language = $this->getMockBuilder('\ilLanguage')
38 ->disableOriginalConstructor()
39 ->getMock();
40
41 $this->group = new Group($this->dataFactory, $this->language);
42 }
43
44 public function testHasMinLength()
45 {
46 $instance = $this->group->hasMinLength(4);
47 $this->assertInstanceOf(HasMinLength::class, $instance);
48 }
49
50 public function testHasLowerChars()
51 {
52 $instance = $this->group->hasLowerChars();
53 $this->assertInstanceOf(HasLowerChars::class, $instance);
54 }
55
56 public function testHasNumbers()
57 {
58 $instance = $this->group->hasNumbers();
59 $this->assertInstanceOf(HasNumbers::class, $instance);
60 }
61
62 public function testHasSpecialChars()
63 {
64 $instance = $this->group->hasSpecialChars();
65 $this->assertInstanceOf(HasSpecialChars::class, $instance);
66 }
67
68 public function testHasUpperChars()
69 {
70 $instance = $this->group->hasUpperChars();
71 $this->assertInstanceOf(HasUpperChars::class, $instance);
72 }
73}
An exception for terminatinating execution or to throw for unit testing.
Builds data types.
Definition: Factory.php:20
language()
Definition: language.php:2