Commit 0c31d4e8 authored by Paris Liakos's avatar Paris Liakos

Removed deprecated media type tests

parent a252677a
......@@ -16,7 +16,6 @@ files[] = includes/MediaEntityTranslationHandler.inc
files[] = includes/media_views_plugin_display_media_browser.inc
files[] = includes/media_views_plugin_style_media_browser.inc
files[] = tests/media.test
files[] = tests/media.types.test
files[] = tests/media.entity.test
configure = admin/config/media/browser
<?php
/**
* @file
* Tests for media types.
*/
/**
* Defines media type creation and management test cases.
*/
class MediaTypeTest extends MediaTestHelper {
public static function getInfo() {
return array(
'name' => 'Media types',
'description' => 'Tests media types',
'group' => 'Media',
);
}
/**
* Tests creating a new type.
*/
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.');
}
/**
* Tests that weight is respected when types are created.
*/
function testOrder() {
$type = $this->createType(array(
'name' => 'last',
'label' => 'Last',
'weight' => 100,
));
$type = $this->createType(array(
'name' => 'first',
'label' => 'First',
));
$types = media_type_get_types();
$keys = array_keys($types);
$this->assertTrue(isset($types['last']) && isset($types['first']), 'Both types were saved.');
$this->assertTrue(array_search('last', $keys) > array_search('first', $keys), 'The type which was supposed to come first came first.');
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment