protected function SoundcloudEmbedFormatterTest::setUp in Media entity Soundcloud 8
@inheritDoc
Overrides WebTestBase::setUp
File
- src/
Tests/ SoundcloudEmbedFormatterTest.php, line 49
Class
- SoundcloudEmbedFormatterTest
- Tests for Soundcloud embed formatter.
Namespace
Drupal\media_entity_soundcloud\TestsCode
protected function setUp() {
parent::setUp();
// Create a test soundcloud media bundle.
$bundle['bundle'] = 'soundcloud';
$this->bundle = $this
->drupalCreateMediaBundle($bundle, 'soundcloud');
// Create an admin user with permissions to administer and create media.
$this->adminUser = $this
->drupalCreateUser([
'administer media',
'administer media bundles',
'administer media fields',
'administer media form display',
'administer media display',
// Media entity permissions.
'view media',
'create media',
'update media',
'update any media',
'delete media',
'delete any media',
// Other permissions.
'administer views',
]);
// Login the user.
$this
->drupalLogin($this->adminUser);
}