t('FeedAPI Mapper Embedded Image Field'), 'description' => t('Test FeedAPI Mapper support for Embedded Image Field (part of emfield)'), 'group' => t('FeedAPI Mapper'), ); } /** * SimpleTest core method: code run before each and every test method. */ function setUp() { // Always call the setUp() function from the parent class. @parent::setUp( 'feedapi', 'feedapi_node', 'parser_simplepie', 'parser_common_syndication', 'feedapi_mapper', 'content', 'emfield', 'emimage' ); // Create users. $this->admin_user = $this->drupalCreateUser( array( 'administer content types', 'administer feedapi', 'administer nodes', 'administer site configuration', 'advanced feedapi options', 'create feed content', ) ); } function testEmimageMapping() { $options = array( 'fields' => array( 'alpha' => 'emimage', 'beta' => 'emimage', 'gamma' => 'emimage', ), 'filename' => 'drupal.xml', // @todo: provide data source with EM images! 'mappers' => array('node'), 'mapping' => array( serialize(array('title')) => serialize(array('node', 'title')), serialize(array('description')) => serialize(array('node', 'body')), // @todo: add mappings to emfield ), ); $this->drupalLogin($this->admin_user); $this->enableParsers(TRUE, FALSE); $feed_url = $this->setupFeed($options); // Check one of the nodes $this->drupalGet('admin/content/node/overview'); $this->clickLink('How we will make Drupal 7 simple to use'); $this->deleteFeed($feed_url); $this->drupalLogout(); } }