This repository was archived by the owner on Jan 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1111use Drupal \rest \Entity \RestResourceConfig ;
1212use Drupal \user \Entity \Role ;
1313use Drupal \user \Entity \User ;
14- use Stack \StackedHttpKernel ;
14+ use Drupal \ Core \ StackMiddleware \StackedHttpKernel ;
1515use Symfony \Component \HttpFoundation \Request ;
1616
1717/**
@@ -70,10 +70,6 @@ protected function setUp(): void {
7070 $ this ->installConfig (['user ' ]);
7171 $ this ->installConfig (['simple_oauth ' ]);
7272
73- $ this ->drupalSetUpCurrentUser ();
74- $ this ->setCurrentUser (User::getAnonymousUser ());
75- $ this ->grantPermissions (Role::load (Role::ANONYMOUS_ID ), ['restful post simple_oauth_auth_code_auth_code ' ]);
76-
7773 RestResourceConfig::create ([
7874 'id ' => 'simple_oauth_auth_code_auth_code ' ,
7975 'plugin_id ' => 'simple_oauth_auth_code_auth_code ' ,
@@ -85,6 +81,10 @@ protected function setUp(): void {
8581 ],
8682 ])->save ();
8783
84+ $ this ->drupalSetUpCurrentUser ();
85+ $ this ->setCurrentUser (User::getAnonymousUser ());
86+ $ this ->grantPermissions (Role::load (Role::ANONYMOUS_ID ), ['restful post simple_oauth_auth_code_auth_code ' ]);
87+
8888 $ this ->clientSecret = $ this ->randomString ();
8989
9090 $ this ->client = Consumer::create ([
You can’t perform that action at this time.
0 commit comments