ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilContextTest Class Reference

TestCase for the ilContext. More...

+ Inheritance diagram for ilContextTest:
+ Collaboration diagram for ilContextTest:

Public Member Functions

 testInit ($context, $className)
 test init ilContext More...
 
 contextProvider ()
 

Protected Member Functions

 setUp ()
 

Protected Attributes

 $backupGlobals = FALSE
 

Detailed Description

Member Function Documentation

◆ contextProvider()

ilContextTest::contextProvider ( )

Definition at line 28 of file ilContextTest.php.

References array, ilContext\CONTEXT_CRON, ilContext\CONTEXT_ICAL, ilContext\CONTEXT_REST, ilContext\CONTEXT_RSS, ilContext\CONTEXT_RSS_AUTH, ilContext\CONTEXT_SCORM, ilContext\CONTEXT_SESSION_REMINDER, ilContext\CONTEXT_SOAP, ilContext\CONTEXT_SOAP_WITHOUT_CLIENT, ilContext\CONTEXT_UNITTEST, ilContext\CONTEXT_WAC, ilContext\CONTEXT_WEB, and ilContext\CONTEXT_WEBDAV.

28  {
29  require_once("Services/Context/test/class.ilContextExtended.php");
30 
31  return array(array(ilContextExtended::CONTEXT_WEB,"ilContextWeb"),
32  array(ilContextExtended::CONTEXT_CRON,"ilContextCron"),
33  array(ilContextExtended::CONTEXT_RSS,"ilContextRss"),
34  array(ilContextExtended::CONTEXT_ICAL,"ilContextIcal"),
35  array(ilContextExtended::CONTEXT_SOAP,"ilContextSoap"),
36  array(ilContextExtended::CONTEXT_WEBDAV,"ilContextWebdav"),
37  array(ilContextExtended::CONTEXT_RSS_AUTH,"ilContextRssAuth"),
38  array(ilContextExtended::CONTEXT_SESSION_REMINDER,"ilContextSessionReminder"),
39  array(ilContextExtended::CONTEXT_SOAP_WITHOUT_CLIENT,"ilContextSoapWithoutClient"),
40  array(ilContextExtended::CONTEXT_UNITTEST,"ilContextUnitTest"),
41  array(ilContextExtended::CONTEXT_REST,"ilContextRest"),
42  array(ilContextExtended::CONTEXT_SCORM,"ilContextScorm"),
43  array(ilContextExtended::CONTEXT_WAC,"ilContextWAC"));
44  }
const CONTEXT_WAC
const CONTEXT_RSS
const CONTEXT_WEBDAV
const CONTEXT_UNITTEST
const CONTEXT_CRON
const CONTEXT_SCORM
const CONTEXT_RSS_AUTH
const CONTEXT_SESSION_REMINDER
const CONTEXT_REST
const CONTEXT_ICAL
const CONTEXT_SOAP_WITHOUT_CLIENT
Create styles array
The data for the language used.
const CONTEXT_WEB
const CONTEXT_SOAP

◆ setUp()

ilContextTest::setUp ( )
protected

Definition at line 11 of file ilContextTest.php.

11  {
12  PHPUnit_Framework_Error_Deprecated::$enabled = FALSE;
13  require_once("Services/Context/test/class.ilContextExtended.php");
14  }

◆ testInit()

ilContextTest::testInit (   $context,
  $className 
)

test init ilContext

contextProvider

Definition at line 21 of file ilContextTest.php.

References ilContextExtended\getClassName(), ilContext\getType(), and ilContext\init().

21  {
22  $context_obj = ilContextExtended::init($context);
23  $this->assertTrue($context_obj);
24  $this->assertEquals(ilContextExtended::getType(), $context);
25  $this->assertEquals(ilContextExtended::getClassName(), $className);
26  }
static getClassName()
Get context className.
static init($a_type)
Init context by type.
static getType()
Get context type.
+ Here is the call graph for this function:

Field Documentation

◆ $backupGlobals

ilContextTest::$backupGlobals = FALSE
protected

Definition at line 9 of file ilContextTest.php.


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