class ParserIcalFeedsLocationTestCase in iCal feed parser 7
Same name and namespace in other branches
- 6.2 tests/parser_ical_feeds.test \ParserIcalFeedsLocationTestCase
Hierarchy
- class \ParserIcalFeedsTestCase extends \FeedsMapperTestCase
Expanded class hierarchy of ParserIcalFeedsLocationTestCase
File
- tests/
parser_ical_feeds.test, line 184
View source
class ParserIcalFeedsLocationTestCase extends ParserIcalFeedsTestCase {
/**
* Set up the test.
*/
public function setUp() {
parent::setup('text');
}
// Call parent setup with the required module.
public static function getInfo() {
return array(
'name' => t('Location'),
'description' => t('Location parsing and mapping. <strong>Requires Feeds, Date, CCK Text (and in the future geo) module.</strong>'),
'group' => t('iCal Parser'),
);
}
public function createConfiguredFeed() {
$typename = parent::createConfiguredFeed(array(
'location' => array(
'type' => 'text',
),
));
$this
->addMappings('ical', array(
array(
'source' => 'ical_location',
'target' => 'field_location',
),
));
return $typename;
}
/**
* Basic test using Location.ics
*/
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',
),
);
for ($i = 1; $i <= count($data); $i++) {
$this
->drupalGet("node/{$i}/edit");
$this
->assertNodeFieldValue('location', $d['location']);
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ParserIcalFeedsLocationTestCase:: |
public | function |
Basic test configured feed item, to import feed into. Overrides ParserIcalFeedsTestCase:: |
|
ParserIcalFeedsLocationTestCase:: |
public static | function | ||
ParserIcalFeedsLocationTestCase:: |
public | function |
Set up the test. Overrides ParserIcalFeedsTestCase:: |
|
ParserIcalFeedsLocationTestCase:: |
public | function | Basic test using Location.ics | |
ParserIcalFeedsTestCase:: |
public | function | ||
ParserIcalFeedsTestCase:: |
protected | function | ||
ParserIcalFeedsTestCase:: |
protected | function | assertCCKFieldValue uses an XPath on the CCK fields on the form, the method looks in 'value' and for plain text the end date is a 'value2' | |
ParserIcalFeedsTestCase:: |
protected | function | Return the form field name for a given CCK field. Special handling for date fields. |