ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
CategoryReferenceTest Class Reference

Test clipboard repository. More...

+ Inheritance diagram for CategoryReferenceTest:
+ Collaboration diagram for CategoryReferenceTest:

Public Member Functions

 testCommands ()
 Test commands. More...
 

Protected Member Functions

 setUp ()
 
 setGlobalVariable (string $name, $value)
 
 tearDown ()
 

Detailed Description

Test clipboard repository.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 12 of file CategoryReferenceTest.php.

Member Function Documentation

◆ setGlobalVariable()

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

Definition at line 36 of file CategoryReferenceTest.php.

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

Referenced by setUp().

36  : void
37  {
38  global $DIC;
39 
40  $GLOBALS[$name] = $value;
41 
42  unset($DIC[$name]);
43  $DIC[$name] = static function (\ILIAS\DI\Container $c) use ($value) {
44  return $value;
45  };
46  }
$c
Definition: cli.php:38
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:31
global $DIC
Definition: feed.php:28
if($format !==null) $name
Definition: metadata.php:247
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
+ Here is the caller graph for this function:

◆ setUp()

CategoryReferenceTest::setUp ( )
protected

Definition at line 14 of file CategoryReferenceTest.php.

References $dic, $GLOBALS, and setGlobalVariable().

14  : void
15  {
16  $dic = new ILIAS\DI\Container();
17  $GLOBALS['DIC'] = $dic;
18 
19  parent::setUp();
20 
21  $this->setGlobalVariable(
22  "ilAccess",
23  $this->createConfiguredMock(
24  ilAccess::class,
25  [
26  "checkAccess" => true
27  ]
28  )
29  );
30  }
setGlobalVariable(string $name, $value)
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
$dic
Definition: result.php:32
+ Here is the call graph for this function:

◆ tearDown()

CategoryReferenceTest::tearDown ( )
protected

Definition at line 48 of file CategoryReferenceTest.php.

48  : void
49  {
50  }

◆ testCommands()

CategoryReferenceTest::testCommands ( )

Test commands.

Definition at line 55 of file CategoryReferenceTest.php.

References ilObjectAccess\_getCommands().

55  : void
56  {
58  $this->assertIsArray($commands);
59  }
static _getCommands()
get commands
+ Here is the call graph for this function:

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