$this->
drupalPlaceBlock('local_tasks_block'
);
// Create a user who can add media fields.
$user =
$this->
drupalCreateUser([ 'access administration pages',
'administer node fields',
'administer node form display',
]);
$this->
drupalLogin($user);
$this->
drupalCreateContentType(['type' => 'article'
]);
$this->
drupalCreateContentType(['type' => 'page'
]);
$this->
createMediaItems([ 'type_one' =>
[ 'Horse',
'Bear',
'Cat',
'Dog',
],
]);
} /**
* Tests field UI integration for media library widget.
*/