ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 $DIC, $ilDB, $ret, ilLinkCheckNotify\_deleteObject(), ilLinkCheckNotify\_getNotifiers(), and ilLinkCheckNotify\_getNotifyStatus().

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

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

78  {
79  include_once './Modules/WebResource/classes/class.ilParameterAppender.php';
80 
81  $appender = new ilParameterAppender(999);
82  $appender->setName('first');
83  $appender->setValue(1);
84  $appender->add(888);
85 
87  foreach ($params as $key => $data) {
88  $appender->delete($key);
89  $this->assertEquals($data['name'], 'first');
90  $this->assertEquals($data['value'], 1);
91  }
92  }
Class ilParameterAppender.
static _getParams($a_link_id)
Get dynamic parameter definitions.
$key
Definition: croninfo.php:18
$data
Definition: bench.php:6
+ 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: