ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
InterestedUserFieldAttributeTest.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\User\Tests;
22 
25 
31 {
33 
34  protected function setUp(): void
35  {
36  $this->interested_user_field_attribute = new InterestedUserFieldAttribute(
37  $this->createMock(\ILIAS\Language\Language::class),
38  'ABCD',
39  'EFGH'
40  );
41  }
42 
43  public function testGetAttributeName(): void
44  {
45  $this->assertEquals('ABCD', $this->interested_user_field_attribute->getAttributeName());
46  }
47 
48  public function testGetFieldName(): void
49  {
50  $this->assertEquals('INVALID TRANSLATION KEY', $this->interested_user_field_attribute->getName());
51  }
52 
53  public function testAddGetComponent(): void
54  {
55  $this->interested_user_field_attribute->addComponent(
56  'comp name',
57  'Description'
58  );
59 
60  $this->assertEquals(
61  [
62  'comp name' => new InterestedUserFieldComponent(
63  'comp name',
64  'Description'
65  )
66  ],
67  $this->interested_user_field_attribute->getComponents()
68  );
69  }
70 }
Interface Observer Contains several chained tasks and infos about them.