ILIAS  trunk Revision v11.0_alpha-1753-gb21ca8c4367
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
PasswordTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 require_once("vendor/composer/vendor/autoload.php");
22 
23 use ILIAS\Data;
25 
31 class PasswordTest extends TestCase
32 {
33  protected Data\Factory $f;
34 
35  protected function setUp(): void
36  {
37  $this->f = new Data\Factory();
38  }
39 
40  public function testValue(): void
41  {
42  $pass = 'secret';
43  $pwd = $this->f->password($pass);
44  $this->assertEquals($pass, $pwd->toString());
45  }
46 
47  public function testWrongParam(): void
48  {
49  $this->expectException(TypeError::class);
50  $pwd = $this->f->password(123);
51  }
52 }
Tests working with color data object.
Data Factory $f