ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
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 36 of file ilWebResourceTest.php.

Member Function Documentation

◆ setUp()

ilwebresourceTest::setUp ( )
protected

Definition at line 40 of file ilWebResourceTest.php.

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

◆ testLinkCheck()

ilwebresourceTest::testLinkCheck ( )

Link check test IL_Init.

Parameters

Definition at line 52 of file ilWebResourceTest.php.

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

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

◆ testWebResourceParameters()

ilwebresourceTest::testWebResourceParameters ( )

IL_Init

Definition at line 79 of file ilWebResourceTest.php.

References $data, and ilParameterAppender\_getParams().

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

Field Documentation

◆ $backupGlobals

ilwebresourceTest::$backupGlobals = false
protected

Definition at line 38 of file ilWebResourceTest.php.


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