ILIAS  release_8 Revision v8.24
ilConditionsTest Class Reference

Unit tests for class ilCopyWizardOptions. More...

+ Inheritance diagram for ilConditionsTest:
+ Collaboration diagram for ilConditionsTest:

Public Member Functions

 testCondition ()
 

Protected Member Functions

 setGlobalVariable (string $name, $value)
 

Protected Attributes

 $backupGlobals = false
 
Container $dic
 

Detailed Description

Unit tests for class ilCopyWizardOptions.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

Definition at line 30 of file ilConditionsTest.php.

Member Function Documentation

◆ setGlobalVariable()

ilConditionsTest::setGlobalVariable ( string  $name,
  $value 
)
protected
Parameters
mixed$value

Definition at line 47 of file ilConditionsTest.php.

47 : void
48 {
49 global $DIC;
50
51 $GLOBALS[$name] = $value;
52 unset($DIC[$name]);
53 $DIC[$name] = static function (\ILIAS\DI\Container $c) use ($value) {
54 return $value;
55 };
56 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:32
$c
Definition: cli.php:38
global $DIC
Definition: feed.php:28
if($format !==null) $name
Definition: metadata.php:247

References $c, $DIC, $GLOBALS, and $name.

◆ testCondition()

ilConditionsTest::testCondition ( )

Definition at line 36 of file ilConditionsTest.php.

36 : void
37 {
38 $condition = new ilCondition(new ilConditionTrigger(1, 2, 'drei'), 'invalid');
39 $obligatory_condition = $condition->withObligatory(true);
40 $this->assertTrue($obligatory_condition->getObligatory());
41 $this->assertFalse($condition->getObligatory());
42 }
Represents a condition trigger object.
Condition class.

Field Documentation

◆ $backupGlobals

ilConditionsTest::$backupGlobals = false
protected

Definition at line 32 of file ilConditionsTest.php.

◆ $dic

Container ilConditionsTest::$dic
protected

Definition at line 34 of file ilConditionsTest.php.


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