public function MediaResourceTestBase::setUp in Drupal 8
Same name and namespace in other branches
- 9 core/modules/media/tests/src/Functional/Rest/MediaResourceTestBase.php \Drupal\Tests\media\Functional\Rest\MediaResourceTestBase::setUp()
Overrides EntityResourceTestBase::setUp
File
- core/
modules/ media/ tests/ src/ Functional/ Rest/ MediaResourceTestBase.php, line 47
Class
Namespace
Drupal\Tests\media\Functional\RestCode
public function setUp() {
parent::setUp();
\Drupal::configFactory()
->getEditable('media.settings')
->set('standalone_url', TRUE)
->save(TRUE);
// Provisioning the Media REST resource without the File REST resource does
// not make sense.
$this->resourceConfigStorage
->create([
'id' => 'entity.file',
'granularity' => RestResourceConfigInterface::RESOURCE_GRANULARITY,
'configuration' => [
'methods' => [
'GET',
],
'formats' => [
static::$format,
],
'authentication' => isset(static::$auth) ? [
static::$auth,
] : [],
],
'status' => TRUE,
])
->save();
$this->container
->get('router.builder')
->rebuild();
}