public function PMPAPIPermissionsWebTestCase::testPmpAPIPermissionsPushNodeWhitelistAll in Public Media Platform API Integration 7
Pushes a node to the PMP.
File
- pmpapi_permissions/
tests/ pmpapi_permissions.test, line 82
Class
- PMPAPIPermissionsWebTestCase
- Tests the functionality of the PMPAPI permissions module.
Code
public function testPmpAPIPermissionsPushNodeWhitelistAll() {
$this
->createContentType();
$node = $this
->createNodeWithPermissions();
$this
->assertTrue($node, 'Created test node.');
$guid = $node->pmpapi_guid;
sleep(self::SLEEP_TIME);
$pmp = pmpapi_fetch($guid);
$doc = $pmp->query->results->json;
$this
->assertTrue(empty($pmp->errors['query']), 'Pushed node to PMP.');
$this
->assertTrue(empty($doc->links->permission), 'No permissions attached to node (== `whitelist, ALL`)');
node_delete($node->nid);
}