You are here

function MediaTypeTest::testCreate in D7 Media 7

Test creating a new type. Basic CRUD.

File

test/media.types.test, line 57
Tests for media types.

Class

MediaTypeTest
Test media type creation and management.

Code

function testCreate() {
  $type_machine_name = 'foo';
  $type = $this
    ->createType(array(
    'name' => $type_machine_name,
    'label' => 'foobar',
  ));
  $loaded_type = media_type_load($type_machine_name);
  $this
    ->assertEqual($loaded_type->label, 'foobar', "Was able to create a type and retreive it");
}