ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
GroupTest.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23use ILIAS\Data\Factory as DataFactory;
29use ILIAS\Refinery\Password\Group as PasswordGroup;
30use PHPUnit\Framework\TestCase;
32
33class GroupTest extends TestCase
34{
35 private PasswordGroup $group;
36 private DataFactory $dataFactory;
38
39 protected function setUp(): void
40 {
41 $this->dataFactory = new DataFactory();
42 $this->language = $this->getMockBuilder(Language::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}
Builds data types.
Definition: Factory.php:36