ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
GroupTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
22 
29 use ILIAS\Refinery\Password\Group as PasswordGroup;
31 use ilLanguage;
32 
33 class GroupTest extends TestCase
34 {
35  private PasswordGroup $group;
38 
39  protected function setUp(): void
40  {
41  $this->dataFactory = new DataFactory();
42  $this->language = $this->getMockBuilder(ilLanguage::class)
43  ->disableOriginalConstructor()
44  ->getMock();
45 
46  $this->group = new PasswordGroup($this->dataFactory, $this->language);
47  }
48 
49  public function testHasMinLength(): void
50  {
51  $instance = $this->group->hasMinLength(4);
52  $this->assertInstanceOf(HasMinLength::class, $instance);
53  }
54 
55  public function testHasLowerChars(): void
56  {
57  $instance = $this->group->hasLowerChars();
58  $this->assertInstanceOf(HasLowerChars::class, $instance);
59  }
60 
61  public function testHasNumbers(): void
62  {
63  $instance = $this->group->hasNumbers();
64  $this->assertInstanceOf(HasNumbers::class, $instance);
65  }
66 
67  public function testHasSpecialChars(): void
68  {
69  $instance = $this->group->hasSpecialChars();
70  $this->assertInstanceOf(HasSpecialChars::class, $instance);
71  }
72 
73  public function testHasUpperChars(): void
74  {
75  $instance = $this->group->hasUpperChars();
76  $this->assertInstanceOf(HasUpperChars::class, $instance);
77  }
78 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: GroupTest.php:21