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

Parameters

Definition at line 50 of file ilWebResourceTest.php.

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

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  }
static _deleteObject($a_obj_id)
class for checking external links in page objects.
static _getNotifiers($a_obj_id)
Create styles array
The data for the language used.
static _getNotifyStatus($a_usr_id, $a_obj_id)
global $ilDB
$ret
Definition: parser.php:6
+ Here is the call graph for this function:

◆ testWebResourceParameters()

ilwebresourceTest::testWebResourceParameters ( )

IL_Init

Definition at line 75 of file ilWebResourceTest.php.

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

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