Skip to content

Commit 69f0cac

Browse files
committed
Test reponse-results
1 parent 52a9a7d commit 69f0cac

4 files changed

Lines changed: 8 additions & 0 deletions

File tree

tests/modules/admin/src/Controller/SandboxTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,6 @@ public function testSandbox(): void
5252
$response = $c->main();
5353

5454
$this->assertInstanceOf(Template::class, $response);
55+
$this->assertTrue($response->isSuccessful());
5556
}
5657
}

tests/modules/core/src/Controller/ErrorReportTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public function testErrorReportSent(): void
6565
$response = $c->main($request);
6666

6767
$this->assertInstanceOf(Template::class, $response);
68+
$this->assertTrue($response->isSuccessful());
6869
$this->assertEquals('core:errorreport.twig', $response->getTemplateName());
6970
}
7071

@@ -109,5 +110,6 @@ public function testErrorReport(): void
109110
$response = $c->main($request);
110111

111112
$this->assertInstanceOf(RunnableResponse::class, $response);
113+
$this->assertTrue($response->isSuccessful());
112114
}
113115
}

tests/modules/core/src/Controller/LoginTest.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ public function testWelcome(): void
6767
$response = $c->welcome();
6868

6969
$this->assertInstanceOf(Template::class, $response);
70+
$this->assertTrue($response->isSuccessful());
7071
$this->assertEquals('core:welcome.twig', $response->getTemplateName());
7172
}
7273

@@ -135,6 +136,7 @@ protected function login(string $username, string $password): array
135136
$response = $c->loginuserpass($request);
136137

137138
$this->assertInstanceOf(Template::class, $response);
139+
$this->assertTrue($response->isSuccessful());
138140
$this->assertEquals('core:loginuserpass.twig', $response->getTemplateName());
139141
}
140142

@@ -205,6 +207,7 @@ protected function getOrganizations(): array
205207
$response = $c->loginuserpassorg($request);
206208
207209
$this->assertInstanceOf(Template::class, $response);
210+
$this->assertTrue($response->isSuccessful());
208211
$this->assertEquals('core:loginuserpass.twig', $response->getTemplateName());
209212
}
210213
*/

tests/modules/core/src/Controller/LogoutTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ public function testLogout(): void
6565
$response = $c->logout($request, 'example-authsource');
6666

6767
$this->assertInstanceOf(RunnableResponse::class, $response);
68+
$this->assertTrue($response->isSuccessful());
6869
$callable = $response->getCallable();
6970
$this->assertInstanceOf(Auth\Simple::class, $callable[0]);
7071
$this->assertEquals('logout', $callable[1]);
@@ -101,6 +102,7 @@ public function testLogoutReturnToAllowedUrl(): void
101102

102103
$response = $c->logout($request, 'example-authsource');
103104
$this->assertInstanceOf(RunnableResponse::class, $response);
105+
$this->assertTrue($response->isSuccessful());
104106
$this->assertEquals('https://example.org/something', $response->getArguments()[0]);
105107
}
106108

0 commit comments

Comments
 (0)