public function PMPAPIWebTestCase::testPmpAPIFetchDoc in Public Media Platform API Integration 7
Fetches a doc from the PMP.
File
- tests/
pmpapi.test, line 56
Class
- PMPAPIWebTestCase
- Tests the functionality of the PMPAPI module.
Code
public function testPmpAPIFetchDoc() {
module_load_include('php', 'pmpapi', 'tests/settings');
$vars = pmpapi_test_get_secret_vars();
$doc = pmpapi_fetch($vars['story_guid']);
$is_non_empty_object = is_object($doc) && !empty($doc) && empty($doc->errors['query']);
$this
->assertTrue($is_non_empty_object, 'successfully pulled, without errors, object that is not empty.');
}