Skip to content
Snippets Groups Projects

Issue #3218622: Improve DX of EntityKernelTestBase::enableModules(), call ::refreshServices() there

Open Issue #3218622: Improve DX of EntityKernelTestBase::enableModules(), call ::refreshServices() there

Merge request reports

Members who can merge are allowed to add commits.
Ready to merge by members who can write to the target branch.
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Dave Long
  • 26 26 $this->assertSame($account->id(), $current_user->id());
    27 27 }
    28 28
    29 /**
    30 * Ensure that calls to enable or disable modules result in our getting
  • Brad Jones added 1 commit

    added 1 commit

    • 1075426b - Apply 2 suggestion(s) to 1 file(s)

    Compare with previous version

  • Brad Jones added 1 commit

    added 1 commit

    Compare with previous version

  • 26 26 $this->assertSame($account->id(), $current_user->id());
    27 27 }
    28 28
    29 /**
    30 * Ensure references to DI objects are kept in sync.
    31 */
    32 public function testEnsureContainerIntegrity() {
    33 $storage = new \SplObjectStorage();
    34 $this->disableModules(['user']);
    35 $storage->attach($this->entityTypeManager);
    36 $this->assertTrue($storage->contains(\Drupal::entityTypeManager()));
    • This test is unnecessarily complex - it can be...

          $this->disableModules(['user']);
          $this->assertSame($this->entityTypeManager, $this->container->get('entity_type.manager'));

      assertSame will check object identity.

    • I feel as though I tried this and it actually didn't work, but let me revisit.

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