You are here

public function PMPAPIPullWebTestCase::testPmpAPIPullPullStoryWithImage in Public Media Platform API Integration 7

Pulls a story doc (with attached image) from the PMP and maps it to a node.

File

pmpapi_pull/tests/pmpapi_pull.test, line 107

Class

PMPAPIPullWebTestCase
Tests the functionality of the PMPAPI pull module.

Code

public function testPmpAPIPullPullStoryWithImage() {
  $field_image = array(
    'field_name' => 'field_image',
  );
  $this
    ->createContentType(array(
    $field_image,
  ));
  $node = pmpapi_pull_pull_doc($this->story_with_image_guid);
  $this
    ->assertTrue($node->nid, 'Pulled story with image and created node.');
  $this
    ->assertTrue(!empty($node->field_image['und'][0]['fid']), 'Image is attached to node.');
}