ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
PasswordTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /* Copyright (c) 2018 Nils Haagen <nils.haagen@concepts-and-training.de> Extended GPL, see docs/LICENSE */
6 
7 require_once("libs/composer/vendor/autoload.php");
8 
9 use ILIAS\Data;
11 
17 class PasswordTest extends TestCase
18 {
19  protected Data\Factory $f;
20 
21  protected function setUp(): void
22  {
23  $this->f = new Data\Factory();
24  }
25 
26  public function testValue(): void
27  {
28  $pass = 'secret';
29  $pwd = $this->f->password($pass);
30  $this->assertEquals($pass, $pwd->toString());
31  }
32 
33  public function testWrongParam(): void
34  {
35  $this->expectException(TypeError::class);
36  $pwd = $this->f->password(123);
37  }
38 }
Tests working with color data object.
Data Factory $f
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...