ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
TimeZoneTest.php
Go to the documentation of this file.
1 <?php
2 
3 
5 {
6 
7  public function setUp()
8  {
9  if (!defined('PHPEXCEL_ROOT')) {
10  define('PHPEXCEL_ROOT', APPLICATION_PATH . '/');
11  }
12  require_once(PHPEXCEL_ROOT . 'PHPExcel/Autoloader.php');
13  }
14 
15  public function testSetTimezone()
16  {
17  $timezoneValues = array(
18  'Europe/Prague',
19  'Asia/Tokyo',
20  'America/Indiana/Indianapolis',
21  'Pacific/Honolulu',
22  'Atlantic/St_Helena',
23  );
24 
25  foreach($timezoneValues as $timezoneValue) {
26  $result = call_user_func(array('PHPExcel_Shared_TimeZone','setTimezone'),$timezoneValue);
27  $this->assertTrue($result);
28  }
29 
30  }
31 
33  {
34  $unsupportedTimezone = 'Etc/GMT+10';
35  $result = call_user_func(array('PHPExcel_Shared_TimeZone','setTimezone'),$unsupportedTimezone);
36  $this->assertFalse($result);
37  }
38 
39 }
$result
testSetTimezoneWithInvalidValue()
Create styles array
The data for the language used.
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
Definition: bootstrap.php:27