1 file.test | FileTypeTestCase::testCreate() |
Test creating a new type. Basic CRUD.
File
- core/
modules/ file/ tests/ file.test, line 3195 - Tests for file.module.
Class
- FileTypeTestCase
- Tests adding support for bundles to the core 'file' entity.
Code
function testCreate() {
$type_machine_type = 'foo';
$type_machine_label = 'foobar';
$type = $this->createFileType(array('type' => $type_machine_type, 'name' => $type_machine_label));
$loaded_type = file_type_load($type_machine_type);
$this->assertEqual($loaded_type->name, $type_machine_label, "Was able to create a type and retrieve it.");
}