ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
ilContextTest.php
Go to the documentation of this file.
1
<?
php
8
class
ilContextTest
extends
PHPUnit_Framework_TestCase
9
{
10
protected
$backupGlobals
=
false
;
11
12
protected
function
setUp
()
13
{
14
PHPUnit_Framework_Error_Deprecated::$enabled =
false
;
15
require_once(
"Services/Context/test/class.ilContextExtended.php"
);
16
}
17
23
public
function
testInit
(
$context
, $className)
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
}
30
31
public
function
contextProvider
()
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
}
49
}
ilContext\CONTEXT_WAC
const CONTEXT_WAC
Definition:
class.ilContext.php:32
$context
$context
Definition:
webdav.php:25
ilContextExtended\getClassName
static getClassName()
Get context className.
Definition:
class.ilContextExtended.php:24
ilContext\CONTEXT_RSS
const CONTEXT_RSS
Definition:
class.ilContext.php:21
ilContext\CONTEXT_WEBDAV
const CONTEXT_WEBDAV
Definition:
class.ilContext.php:25
ilContext\CONTEXT_UNITTEST
const CONTEXT_UNITTEST
Definition:
class.ilContext.php:29
ilContext\CONTEXT_CRON
const CONTEXT_CRON
Definition:
class.ilContext.php:20
ilContext\CONTEXT_SCORM
const CONTEXT_SCORM
Definition:
class.ilContext.php:31
ilContext\CONTEXT_RSS_AUTH
const CONTEXT_RSS_AUTH
Definition:
class.ilContext.php:26
ilContextTest\testInit
testInit($context, $className)
test init ilContext
Definition:
ilContextTest.php:23
PHPUnit_Framework_TestCase
ilContext\CONTEXT_SESSION_REMINDER
const CONTEXT_SESSION_REMINDER
Definition:
class.ilContext.php:27
ilContext\CONTEXT_REST
const CONTEXT_REST
Definition:
class.ilContext.php:30
ilContext\CONTEXT_ICAL
const CONTEXT_ICAL
Definition:
class.ilContext.php:22
ilContext\CONTEXT_SOAP_WITHOUT_CLIENT
const CONTEXT_SOAP_WITHOUT_CLIENT
Definition:
class.ilContext.php:28
ilContextTest\setUp
setUp()
Definition:
ilContextTest.php:12
ilContext\init
static init($a_type)
Init context by type.
Definition:
class.ilContext.php:45
ilContextTest\$backupGlobals
$backupGlobals
Definition:
ilContextTest.php:10
ilContext\CONTEXT_WEB
const CONTEXT_WEB
Definition:
class.ilContext.php:19
php
ilContext\getType
static getType()
Get context type.
Definition:
class.ilContext.php:182
ilContext\CONTEXT_SOAP
const CONTEXT_SOAP
Definition:
class.ilContext.php:23
ilContextTest\contextProvider
contextProvider()
Definition:
ilContextTest.php:31
ilContextTest
TestCase for the ilContext.
Definition:
ilContextTest.php:8
Services
Context
test
ilContextTest.php
Generated on Thu Jan 16 2025 19:02:20 for ILIAS by
1.8.13 (using
Doxyfile
)