ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilContextTest.php
Go to the documentation of this file.
1 <?php
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 }
const CONTEXT_WAC
$context
Definition: webdav.php:25
static getClassName()
Get context className.
const CONTEXT_RSS
const CONTEXT_WEBDAV
const CONTEXT_UNITTEST
const CONTEXT_CRON
const CONTEXT_SCORM
const CONTEXT_RSS_AUTH
testInit($context, $className)
test init ilContext
const CONTEXT_SESSION_REMINDER
const CONTEXT_REST
const CONTEXT_ICAL
const CONTEXT_SOAP_WITHOUT_CLIENT
static init($a_type)
Init context by type.
const CONTEXT_WEB
static getType()
Get context type.
const CONTEXT_SOAP
TestCase for the ilContext.