You are here

public function PMPAPIWebTestCase::testPmpAPISendDoc in Public Media Platform API Integration 7

Sends a simple doc to the PMP.

File

tests/pmpapi.test, line 88

Class

PMPAPIWebTestCase
Tests the functionality of the PMPAPI module.

Code

public function testPmpAPISendDoc() {
  $values = array(
    'attributes' => array(
      'title' => $this
        ->randomName(20),
      'teaser' => $this
        ->randomName(10),
    ),
  );
  $doc = pmpapi_send($values);
  sleep(self::SLEEP_TIME);
  pmpapi_remove($doc->attributes->guid);
  $this
    ->assertTrue(is_object($doc), 'successfully pushed a story to the PMP.');
}