ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 31 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.

32  {
33  require_once("Services/Context/test/class.ilContextExtended.php");
34 
35  return array(array(ilContextExtended::CONTEXT_WEB,"ilContextWeb"),
36  array(ilContextExtended::CONTEXT_CRON,"ilContextCron"),
37  array(ilContextExtended::CONTEXT_RSS,"ilContextRss"),
38  array(ilContextExtended::CONTEXT_ICAL,"ilContextIcal"),
39  array(ilContextExtended::CONTEXT_SOAP,"ilContextSoap"),
40  array(ilContextExtended::CONTEXT_WEBDAV,"ilContextWebdav"),
41  array(ilContextExtended::CONTEXT_RSS_AUTH,"ilContextRssAuth"),
42  array(ilContextExtended::CONTEXT_SESSION_REMINDER,"ilContextSessionReminder"),
43  array(ilContextExtended::CONTEXT_SOAP_WITHOUT_CLIENT,"ilContextSoapWithoutClient"),
44  array(ilContextExtended::CONTEXT_UNITTEST,"ilContextUnitTest"),
45  array(ilContextExtended::CONTEXT_REST,"ilContextRest"),
46  array(ilContextExtended::CONTEXT_SCORM,"ilContextScorm"),
47  array(ilContextExtended::CONTEXT_WAC,"ilContextWAC"));
48  }
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 12 of file ilContextTest.php.

13  {
14  PHPUnit_Framework_Error_Deprecated::$enabled = false;
15  require_once("Services/Context/test/class.ilContextExtended.php");
16  }

◆ testInit()

ilContextTest::testInit (   $context,
  $className 
)

test init ilContext

contextProvider

Definition at line 23 of file ilContextTest.php.

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

24  {
25  $context_obj = ilContextExtended::init($context);
26  $this->assertTrue($context_obj);
27  $this->assertEquals(ilContextExtended::getType(), $context);
28  $this->assertEquals(ilContextExtended::getClassName(), $className);
29  }
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 10 of file ilContextTest.php.


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