You are here

public function ParserIcalFeedsLocationTestCase::testLocationFeed in iCal feed parser 6.2

Same name and namespace in other branches
  1. 7 tests/parser_ical_feeds.test \ParserIcalFeedsLocationTestCase::testLocationFeed()

Basic test using Location.ics

File

tests/parser_ical_feeds.test, line 215

Class

ParserIcalFeedsLocationTestCase

Code

public function testLocationFeed() {
  $typename = $this
    ->createConfiguredFeed();

  // Import iCal file.
  $this
    ->importFile('ical', $this
    ->absolutePath() . '/tests/feeds/Location.ics');
  $this
    ->assertText('Created 3 ' . $typename . ' nodes.');

  // Check the imported nodes.
  // Timezones
  $data = array(
    array(
      'title' => 'Basic location',
      'location' => 'Text location',
    ),
  );
  foreach ($data as $d) {
    $n = node_load(array(
      'title' => $d['title'],
    ), NULL, TRUE);
    $this
      ->drupalGet('node/' . $n->nid . '/edit');
    $this
      ->assertCCKFieldValue('location', $d['location']);
  }
}