public function FeedsEntityProcessorDateTest::test in Feeds entity processor 7
Basic test.
File
- tests/
src/ FeedsEntityProcessorDateTest.test, line 88 - Contains FeedsEntityProcessorDateTest.
Class
- FeedsEntityProcessorDateTest
- Tests importing entities with properties of various data types.
Code
public function test() {
$this
->addMappings('syndication', array(
2 => array(
'source' => 'created',
'target' => 'created',
),
));
// Run import.
$this
->importURL('syndication', $GLOBALS['base_url'] . '/' . drupal_get_path('module', 'feeds_entity_processor') . '/tests/resources/content_date.csv');
$this
->assertText('Created 7 test entities');
foreach ($this
->getExpectedTimestamps() as $entity_id => $expected_value) {
$entity = entity_load_single('feeds_entity_processor_test', $entity_id);
$this
->assertEqual($expected_value, $entity->created);
}
}