You are here

protected function PMPAPIPushWebTestCase::createFileEntity in Public Media Platform API Integration 7

Creates a new file entity.

Currently can only create an image entity, so the name is deceptive.

3 calls to PMPAPIPushWebTestCase::createFileEntity()
PMPAPIPushWebTestCase::testPmpAPIPushNodeWithRelatedImage in pmpapi_push/tests/pmpapi_push.test
Pushes node (with attached image) to the PMP.
PMPAPIPushWebTestCase::testPmpAPIPushPushImage in pmpapi_push/tests/pmpapi_push.test
Pushes an image to the PMP.
PMPAPIPushWebTestCase::testPmpAPIPushStopDeleteAttempt in pmpapi_push/tests/pmpapi_push.test
Pushes a node, and then tries to delete three times (with bad API credentials).

File

pmpapi_push/tests/pmpapi_push.test, line 269

Class

PMPAPIPushWebTestCase
Tests the functionality of the PMPAPI push module.

Code

protected function createFileEntity() {
  $file = next($this->files['image']);
  $this
    ->assertTrue(file_save($file), 'Created file.');
  return $file;
}