Skip to content
Snippets Groups Projects

Issue #3224530: Pass the media library state object to createAccess()

Issue #3224530: Pass the media library state object to createAccess()

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Adam G-H added 1 commit

    added 1 commit

    • 624fd9cd - Ensure form is visible when a legit media type is checked

    Compare with previous version

  • Adam G-H resolved all threads

    resolved all threads

  • Adam G-H added 1 commit

    added 1 commit

    • b5b8809d - Improve access denied condition in test

    Compare with previous version

  • Lee Rowlands
  • 383 $this->createMediaType('image')->id(),
    384 ];
    385
    386 $account = $this->createUser(['create media']);
    387 $this->setCurrentUser($account);
    388
    389 /** @var \Drupal\media_library\MediaLibraryUiBuilder $ui_builder */
    390 $ui_builder = $this->container->get('media_library.ui_builder');
    391
    392 $state = MediaLibraryState::create('test', $media_types, $media_types[0], 1);
    393 $build = $ui_builder->buildUi($state);
    394 $this->assertEmpty($build['content']['form']);
    395
    396 $state = MediaLibraryState::create('test', $media_types, $media_types[1], 1);
    397 $build = $ui_builder->buildUi($state);
    398 $this->assertNotEmpty($build['content']['form']);
    • Should we assert that there's at least one key we expect here. In theory the structure might change to include something benign like #cache at a later point and we may find this assert no longer does the job it was intended

    • Please register or sign in to reply
    Please register or sign in to reply
    Loading