You are here

public function ParserIcalFeedsTestCase::setUp in iCal feed parser 6.2

Same name and namespace in other branches
  1. 7.2 tests/parser_ical.test \ParserIcalFeedsTestCase::setUp()
  2. 7 tests/parser_ical_feeds.test \ParserIcalFeedsTestCase::setUp()

Set up the test.

Overrides FeedsWebTestCase::setUp

1 method overrides ParserIcalFeedsTestCase::setUp()
ParserIcalFeedsLocationTestCase::setUp in tests/parser_ical_feeds.test
Set up the test.

File

tests/parser_ical_feeds.test, line 26

Class

ParserIcalFeedsTestCase
Class for testing Feeds <em>content</em> mapper.

Code

public function setUp() {
  $modules = array_merge(array(
    'feeds',
    'feeds_ui',
    'ctools',
    'content',
    'date_api',
    'date',
    'parser_ical',
  ), func_get_args());

  // Call parent setup with the required modules
  if (version_compare(PHP_VERSION, '5.3.0') >= 0) {
    call_user_func_array('parent::setUp', $modules);
  }
  else {
    call_user_func_array(array(
      'parent',
      'setUp',
    ), $modules);
  }

  // date module : consistent site timezone to against
  variable_set('date_default_timezone_name', 'Pacific/Apia');

  // and just because I'll make mistakes working with tests with the US date format
  variable_set('date_format_short', 'Y-m-d H:i');

  // Create user and login.
  $this
    ->drupalLogin($this
    ->drupalCreateUser(array(
    'administer content types',
    'administer feeds',
    'administer nodes',
    'administer site configuration',
  )));
}