@@ -97,10 +97,6 @@ protected function setUp(): void {
9797 }
9898
9999 public function testBeforeControllerNotLoggedIn () {
100- $ this ->reflector ->expects ($ this ->once ())
101- ->method ('hasAnnotation ' )
102- ->with ('PublicPage ' )
103- ->willReturn (false );
104100 $ this ->userSession ->expects ($ this ->once ())
105101 ->method ('isLoggedIn ' )
106102 ->willReturn (false );
@@ -111,24 +107,9 @@ public function testBeforeControllerNotLoggedIn() {
111107 $ this ->middleware ->beforeController ($ this ->controller , 'index ' );
112108 }
113109
114- public function testBeforeControllerPublicPage () {
115- $ this ->reflector ->expects ($ this ->once ())
116- ->method ('hasAnnotation ' )
117- ->with ('PublicPage ' )
118- ->willReturn (true );
119- $ this ->userSession ->expects ($ this ->never ())
120- ->method ('isLoggedIn ' );
121-
122- $ this ->middleware ->beforeController ($ this ->controller , 'create ' );
123- }
124-
125110 public function testBeforeSetupController () {
126111 $ user = $ this ->createMock (IUser::class);
127112 $ controller = $ this ->createMock (ALoginSetupController::class);
128- $ this ->reflector ->expects ($ this ->once ())
129- ->method ('hasAnnotation ' )
130- ->with ('PublicPage ' )
131- ->willReturn (false );
132113 $ this ->userSession ->expects ($ this ->any ())
133114 ->method ('getUser ' )
134115 ->willReturn ($ user );
@@ -144,10 +125,6 @@ public function testBeforeSetupController() {
144125 public function testBeforeControllerNoTwoFactorCheckNeeded () {
145126 $ user = $ this ->createMock (IUser::class);
146127
147- $ this ->reflector ->expects ($ this ->once ())
148- ->method ('hasAnnotation ' )
149- ->with ('PublicPage ' )
150- ->willReturn (false );
151128 $ this ->userSession ->expects ($ this ->once ())
152129 ->method ('isLoggedIn ' )
153130 ->willReturn (true );
@@ -168,10 +145,6 @@ public function testBeforeControllerTwoFactorAuthRequired() {
168145
169146 $ user = $ this ->createMock (IUser::class);
170147
171- $ this ->reflector ->expects ($ this ->once ())
172- ->method ('hasAnnotation ' )
173- ->with ('PublicPage ' )
174- ->willReturn (false );
175148 $ this ->userSession ->expects ($ this ->once ())
176149 ->method ('isLoggedIn ' )
177150 ->willReturn (true );
0 commit comments