ILIAS  release_7 Revision v7.30-3-g800a261c036
All Data Structures Namespaces Files Functions Variables Modules Pages
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 
15 require_once('./libs/composer/vendor/autoload.php');
16 
17 class 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 }
Builds data types.
Definition: Factory.php:19
language()
Definition: language.php:2