ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilContextTest.php
Go to the documentation of this file.
1 <?php
9  protected $backupGlobals = FALSE;
10 
11  protected function setUp() {
12  PHPUnit_Framework_Error_Deprecated::$enabled = FALSE;
13  require_once("Services/Context/test/class.ilContextExtended.php");
14  }
15 
21  public function testInit($context, $className) {
22  $context_obj = ilContextExtended::init($context);
23  $this->assertTrue($context_obj);
24  $this->assertEquals(ilContextExtended::getType(), $context);
25  $this->assertEquals(ilContextExtended::getClassName(), $className);
26  }
27 
28  public function contextProvider() {
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  }
45 }
const CONTEXT_WAC
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
Create styles array
The data for the language used.
static init($a_type)
Init context by type.
const CONTEXT_WEB
static getType()
Get context type.
const CONTEXT_SOAP
TestCase for the ilContext.