updated core to 8.6.3
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
|
||||
namespace Drupal\Tests\media\Functional;
|
||||
|
||||
use Drupal\Tests\content_translation\Functional\ContentTranslationUITestBase;
|
||||
use Drupal\Tests\media\Traits\MediaTypeCreationTrait;
|
||||
|
||||
/**
|
||||
* Tests the Media Translation UI.
|
||||
*
|
||||
* @group media
|
||||
*/
|
||||
class MediaTranslationUITest extends ContentTranslationUITestBase {
|
||||
|
||||
use MediaTypeCreationTrait;
|
||||
|
||||
/**
|
||||
* {inheritdoc}
|
||||
*/
|
||||
protected $defaultCacheContexts = [
|
||||
'languages:language_interface',
|
||||
'theme',
|
||||
'timezone',
|
||||
'url.query_args:_wrapper_format',
|
||||
'user.permissions',
|
||||
];
|
||||
|
||||
/**
|
||||
* {inheritdoc}
|
||||
*/
|
||||
public static $modules = [
|
||||
'language',
|
||||
'content_translation',
|
||||
'media',
|
||||
'media_test_source',
|
||||
];
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function setUp() {
|
||||
$this->entityTypeId = 'media';
|
||||
$this->bundle = 'test';
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setupBundle() {
|
||||
$this->createMediaType('test', [
|
||||
'id' => $this->bundle,
|
||||
'queue_thumbnail_downloads' => FALSE,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getTranslatorPermissions() {
|
||||
return array_merge(parent::getTranslatorPermissions(), [
|
||||
'administer media',
|
||||
'edit any test media',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getEditorPermissions() {
|
||||
return ['administer media', 'create test media'];
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getAdministratorPermissions() {
|
||||
return array_merge(parent::getAdministratorPermissions(), [
|
||||
'access administration pages',
|
||||
'administer media types',
|
||||
'access media overview',
|
||||
'administer languages',
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function getNewEntityValues($langcode) {
|
||||
return [
|
||||
'name' => [['value' => $this->randomMachineName()]],
|
||||
'field_media_test' => [['value' => $this->randomMachineName()]],
|
||||
] + parent::getNewEntityValues($langcode);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -125,7 +125,7 @@ class MediaDisplayTest extends MediaJavascriptTestBase {
|
||||
]);
|
||||
$node_type->save();
|
||||
|
||||
// Reference the created media using an entity_refernce field and make sure
|
||||
// Reference the created media using an entity_reference field and make sure
|
||||
// the output is what we expect.
|
||||
$storage = FieldStorageConfig::create([
|
||||
'entity_type' => 'node',
|
||||
|
||||
Reference in New Issue
Block a user