ILIAS  release_7 Revision v7.30-3-g800a261c036
ilwebresourceTest Class Reference

Unit tests for tree table @group needsInstalledILIAS. More...

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

Public Member Functions

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

Protected Member Functions

 setUp ()
 

Protected Attributes

 $backupGlobals = false
 

Detailed Description

Unit tests for tree table @group 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 @group IL_Init.

Parameters

return

Definition at line 52 of file ilWebResourceTest.php.

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 }
class for checking external links in page objects.
static _deleteObject($a_obj_id)
static _getNotifiers($a_obj_id)
static _getNotifyStatus($a_usr_id, $a_obj_id)
global $DIC
Definition: goto.php:24
$ret
Definition: parser.php:6
global $ilDB

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

+ Here is the call graph for this function:

◆ testWebResourceParameters()

ilwebresourceTest::testWebResourceParameters ( )

@group IL_Init

Definition at line 79 of file ilWebResourceTest.php.

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
89 foreach ($params as $key => $data) {
90 $appender->delete($key);
91 $this->assertEquals($data['name'], 'first');
92 $this->assertEquals($data['value'], 1);
93 }
94 }
Class ilParameterAppender.
static _getParams($a_link_id)
Get dynamic parameter definitions.
$data
Definition: storeScorm.php:23

References $data, and ilParameterAppender\_getParams().

+ 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: