19declare(strict_types=1);
30use PHPUnit\Framework\TestCase;
32use PHPUnit\Framework\MockObject\Stub;
40 protected function setUp(): void
42 $this->dataFactory =
new DataFactory();
43 $this->
language = $this->createStub(Language::class);
45 $this->group =
new PasswordGroup($this->dataFactory, $this->
language);
50 $instance = $this->group->hasMinLength(4);
51 $this->assertInstanceOf(HasMinLength::class, $instance);
56 $instance = $this->group->hasLowerChars();
57 $this->assertInstanceOf(HasLowerChars::class, $instance);
62 $instance = $this->group->hasNumbers();
63 $this->assertInstanceOf(HasNumbers::class, $instance);
68 $instance = $this->group->hasSpecialChars();
69 $this->assertInstanceOf(HasSpecialChars::class, $instance);
74 $instance = $this->group->hasUpperChars();
75 $this->assertInstanceOf(HasUpperChars::class, $instance);