You are here

protected function MediaInternetTestHelper::createFileType in D7 Media 7.3

Same name and namespace in other branches
  1. 7.4 modules/media_internet/tests/media_internet.test \MediaInternetTestHelper::createFileType()
  2. 7.2 modules/media_internet/tests/media_internet.test \MediaInternetTestHelper::createFileType()
2 calls to MediaInternetTestHelper::createFileType()
MediaInternetProviderTestCase::testMediaInternetCustomProviderWizardStepSkipping in modules/media_internet/tests/media_internet.test
Test skipping each of the file upload wizard steps.
MediaInternetProviderTestCase::testMediaInternetCustomProviderWizardTypes in modules/media_internet/tests/media_internet.test
Test the file upload wizard type step.

File

modules/media_internet/tests/media_internet.test, line 62
Tests for media_internet.module.

Class

MediaInternetTestHelper
Provides methods specifically for testing Media Internet module's remote media handling.

Code

protected function createFileType($overrides = array()) {
  $type = new stdClass();
  $type->type = 'test';
  $type->label = "Test";
  $type->description = '';
  $type->mimetypes = array(
    'image/jpeg',
    'image/gif',
    'image/png',
    'image/tiff',
  );
  foreach ($overrides as $k => $v) {
    $type->{$k} = $v;
  }
  file_type_save($type);
  return $type;
}