ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilwebresourceTest Class Reference

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

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

Definition at line 33 of file ilWebResourceTest.php.

Member Function Documentation

◆ setUp()

ilwebresourceTest::setUp ( )
protected

Definition at line 37 of file ilWebResourceTest.php.

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

◆ testLinkCheck()

ilwebresourceTest::testLinkCheck ( )

Link check test @group IL_Init.

Parameters

return

Definition at line 49 of file ilWebResourceTest.php.

50 {
51 global $ilDB;
52
53 include_once './Services/LinkChecker/classes/class.ilLinkCheckNotify.php';
54
55 $not = new ilLinkCheckNotify($ilDB);
56 $not->setObjId(99999);
57 $not->setUserId(13);
58 $ret = $not->addNotifier();
59 $this->assertEquals($ret,true);
60
61 $status = ilLinkCheckNotify::_getNotifyStatus(13,99999);
62 $this->assertEquals($status,true);
63
64 $notifiers = ilLinkCheckNotify::_getNotifiers(99999);
65 $this->assertEquals($notifiers,array(13));
66
68 $this->assertEquals($del,true);
69 }
class for checking external links in page objects.
_getNotifyStatus($a_usr_id, $a_obj_id)
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 74 of file ilWebResourceTest.php.

75 {
76 include_once './Modules/WebResource/classes/class.ilParameterAppender.php';
77
78 $appender = new ilParameterAppender(999);
79 $appender->setName('first');
80 $appender->setValue(1);
81 $appender->add(888);
82
84 foreach($params as $key => $data)
85 {
86 $appender->delete($key);
87 $this->assertEquals($data['name'],'first');
88 $this->assertEquals($data['value'],1);
89 }
90
91 }
Class ilParameterAppender.
static _getParams($a_link_id)
Get dynamic parameter definitions.
$data
$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 35 of file ilWebResourceTest.php.


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