We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c122d7 commit 3bee757Copy full SHA for 3bee757
1 file changed
yii2-adapter/tests/unit/web/ControllerTest.php
@@ -18,6 +18,7 @@
18
use CraftCms\Cms\Support\Str;
19
use CraftCms\Cms\View\TemplateMode;
20
use Illuminate\Http\Request as HttpRequest;
21
+use Illuminate\Support\Facades\Auth;
22
use Illuminate\Support\Facades\Crypt;
23
use UnitTester;
24
use yii\base\Action;
@@ -51,6 +52,8 @@ class ControllerTest extends TestCase
51
52
public function testBeforeAction(): void
53
{
54
Cms::config()->isSystemLive = true;
55
+ Auth::logout();
56
+ Craft::$app->getUser()->setIdentity(null);
57
58
$this->tester->expectThrowable(ForbiddenHttpException::class, function() {
59
// AllowAnonymous should redirect and Craft::$app->exit(); I.E. An exit exception
0 commit comments