ILIAS  release_8 Revision v8.24
InterestedUserFieldAttributeTest Class Reference

Class InterestedUserFieldAttributeTest. More...

+ Inheritance diagram for InterestedUserFieldAttributeTest:
+ Collaboration diagram for InterestedUserFieldAttributeTest:

Public Member Functions

 testGetAttributeName ()
 
 testGetFieldName ()
 
 testAddGetComponent ()
 

Protected Member Functions

 setUp ()
 
- Protected Member Functions inherited from ilUserBaseTest
 assertException (string $exception_class)
 

Private Attributes

InterestedUserFieldAttribute $interestedUserFieldAttribute
 

Detailed Description

Member Function Documentation

◆ setUp()

InterestedUserFieldAttributeTest::setUp ( )
protected

Definition at line 32 of file InterestedUserFieldAttributeTest.php.

32 : void
33 {
34 global $DIC;
35
36 $DIC = new Container();
37
38 $GLOBALS["lng"] = $this->createMock(ilLanguage::class);
39 unset($DIC["lng"]);
40 $DIC["lng"] = $GLOBALS["lng"];
41
42 $this->interestedUserFieldAttribute = new InterestedUserFieldAttribute("ABCD", "EFGH");
43 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:32
global $DIC
Definition: feed.php:28

References $DIC, and $GLOBALS.

◆ testAddGetComponent()

InterestedUserFieldAttributeTest::testAddGetComponent ( )

Definition at line 55 of file InterestedUserFieldAttributeTest.php.

55 : void
56 {
57 $interestedComponent = $this->interestedUserFieldAttribute->addComponent(
58 "comp name",
59 "Description"
60 );
61
62 $this->assertEquals([$interestedComponent], $this->interestedUserFieldAttribute->getComponents());
63 }

◆ testGetAttributeName()

InterestedUserFieldAttributeTest::testGetAttributeName ( )

Definition at line 45 of file InterestedUserFieldAttributeTest.php.

45 : void
46 {
47 $this->assertEquals("ABCD", $this->interestedUserFieldAttribute->getAttributeName());
48 }

◆ testGetFieldName()

InterestedUserFieldAttributeTest::testGetFieldName ( )

Definition at line 50 of file InterestedUserFieldAttributeTest.php.

50 : void
51 {
52 $this->assertEquals("INVALID TRANSLATION KEY", $this->interestedUserFieldAttribute->getName());
53 }

Field Documentation

◆ $interestedUserFieldAttribute

InterestedUserFieldAttribute InterestedUserFieldAttributeTest::$interestedUserFieldAttribute
private

Definition at line 30 of file InterestedUserFieldAttributeTest.php.


The documentation for this class was generated from the following file: