ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilwebresourceTest Class Reference

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

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 IL_Init.

Parameters

Definition at line 49 of file ilWebResourceTest.php.

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

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)
+ Here is the call graph for this function:

◆ testWebResourceParameters()

ilwebresourceTest::testWebResourceParameters ( )

IL_Init

Definition at line 74 of file ilWebResourceTest.php.

References $data, and ilParameterAppender\_getParams().

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 
83  $params = ilParameterAppender::_getParams(888);
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  }
while($lm_rec=$ilDB->fetchAssoc($lm_set)) $data
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 35 of file ilWebResourceTest.php.


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