function BasicFunctionalityTest::testCalendarSystemsConversion in Calendar Systems 8.2
File
- src/
Tests/ BasicFunctionalityTest.test, line 22
Class
- BasicFunctionalityTest
- Tests basic functionality
Namespace
Drupal\calendar_systems\TestsCode
function testCalendarSystemsConversion() {
$supported_calendars = array(
'iranian' => array(
'source' => '',
'gregorian' => '',
),
'arabic' => array(
'source' => '',
'gregorian' => '',
),
'gregorian' => array(
'source' => '',
'gregorian' => '',
),
'julian' => array(
'source' => '',
'gregorian' => '',
),
'thai' => array(
'source' => '',
'gregorian' => '',
),
);
foreach ($supported_calendars as $calendarName => $calendarInfo) {
$calendar = calendar_systems_get_calendar_instance($calendarName);
$val = $calendar
->strToTimestamp('1380-05-10');
$this
->assertEqual($result, $calendarInfo['gregorian'], "{$calendarName} to gregorian");
$this
->assertEqual($calendarInfo['gregorian'], $result, "{$calendarName} from gregorian");
}
}