function PMPAPIPushWebTestCase::testPmpAPIPushStopDeleteAttempt in Public Media Platform API Integration 7
Pushes a node, and then tries to delete three times (with bad API credentials).
File
- pmpapi_push/
tests/ pmpapi_push.test, line 189
Class
- PMPAPIPushWebTestCase
- Tests the functionality of the PMPAPI push module.
Code
function testPmpAPIPushStopDeleteAttempt() {
$file_entity = $this
->createFileEntity();
$field_image = array(
'field_name' => 'field_image',
);
$this
->createContentType(array(
$field_image,
));
$settings = array(
'field_image' => array(
LANGUAGE_NONE => array(
0 => array(
'fid' => $file_entity->fid,
'display' => 1,
),
),
),
);
$node = $this
->createNode($settings);
$this
->assertTrue($node, 'Node dumped.');
sleep(self::SLEEP_TIME);
$this
->assertTrue(pmpapi_fetch($file_entity->pmpapi_guid), 'Pushed image to PMP.');
$pmp = pmpapi_fetch($node->pmpapi_guid);
$this
->assertTrue($pmp, 'Pushed node to PMP.');
}