ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 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 @group IL_Init.

Parameters

return

Definition at line 50 of file ilWebResourceTest.php.

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 }
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)
$ret
Definition: parser.php:6
global $ilDB

References $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 75 of file ilWebResourceTest.php.

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

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

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