ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilwebresourceTest Class Reference

Unit tests for tree table needsInstalledILIAS. More...

+ Inheritance diagram for ilwebresourceTest:
+ Collaboration diagram for ilwebresourceTest:

Public Member Functions

 testLinkCheck ()
 Link check test IL_Init. More...
 
 testWebResourceParameters ()
 IL_Init More...
 

Protected Member Functions

 setUp ()
 

Protected Attributes

 $backupGlobals = false
 

Detailed Description

Unit tests for tree table needsInstalledILIAS.

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

Definition at line 34 of file ilWebResourceTest.php.

Member Function Documentation

◆ setUp()

ilwebresourceTest::setUp ( )
protected

Definition at line 38 of file ilWebResourceTest.php.

39  {
40  include_once("./Services/PHPUnit/classes/class.ilUnitUtil.php");
41  ilUnitUtil::performInitialisation();
42  }

◆ testLinkCheck()

ilwebresourceTest::testLinkCheck ( )

Link check test IL_Init.

Parameters

Definition at line 50 of file ilWebResourceTest.php.

References $ilDB, $ret, ilLinkCheckNotify\_deleteObject(), ilLinkCheckNotify\_getNotifiers(), ilLinkCheckNotify\_getNotifyStatus(), and array.

51  {
52  global $ilDB;
53 
54  include_once './Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
55 
56  $not = new ilLinkCheckNotify($ilDB);
57  $not->setObjId(99999);
58  $not->setUserId(13);
59  $ret = $not->addNotifier();
60  $this->assertEquals($ret, true);
61 
62  $status = ilLinkCheckNotify::_getNotifyStatus(13, 99999);
63  $this->assertEquals($status, true);
64 
65  $notifiers = ilLinkCheckNotify::_getNotifiers(99999);
66  $this->assertEquals($notifiers, array(13));
67 
69  $this->assertEquals($del, true);
70  }
static _deleteObject($a_obj_id)
class for checking external links in page objects.
static _getNotifiers($a_obj_id)
Create styles array
The data for the language used.
static _getNotifyStatus($a_usr_id, $a_obj_id)
global $ilDB
$ret
Definition: parser.php:6
+ Here is the call graph for this function:

◆ testWebResourceParameters()

ilwebresourceTest::testWebResourceParameters ( )

IL_Init

Definition at line 75 of file ilWebResourceTest.php.

References $data, $key, $params, and ilParameterAppender\_getParams().

76  {
77  include_once './Modules/WebResource/classes/class.ilParameterAppender.php';
78 
79  $appender = new ilParameterAppender(999);
80  $appender->setName('first');
81  $appender->setValue(1);
82  $appender->add(888);
83 
85  foreach ($params as $key => $data) {
86  $appender->delete($key);
87  $this->assertEquals($data['name'], 'first');
88  $this->assertEquals($data['value'], 1);
89  }
90  }
$params
Definition: disable.php:11
Class ilParameterAppender.
static _getParams($a_link_id)
Get dynamic parameter definitions.
$key
Definition: croninfo.php:18
+ Here is the call graph for this function:

Field Documentation

◆ $backupGlobals

ilwebresourceTest::$backupGlobals = false
protected

Definition at line 36 of file ilWebResourceTest.php.


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