@@ -136,12 +136,13 @@ public function testListRendersUsersAndPagination(): void
136136 $ controller ->setContainer ($ this ->createControllerContainer ());
137137
138138 $ response = $ controller ->list (new Request ());
139+ $ content = (string ) $ response ->getContent ();
139140
140141 self ::assertSame (Response::HTTP_OK , $ response ->getStatusCode ());
141- self ::assertStringContainsString ('User 1 ' , ( string ) $ response -> getContent () );
142- self ::assertStringContainsString ('user10@example.com ' , ( string ) $ response -> getContent () );
143- self ::assertStringContainsString ('admin/user/list?page=2 ' , ( string ) $ response -> getContent () );
144- self ::assertStringNotContainsString ('user11@example.com ' , ( string ) $ response -> getContent () );
142+ self ::assertStringContainsString ('<td> User 1</td> ' , $ content );
143+ self ::assertStringContainsString ('<td>User 10</td> ' , $ content );
144+ self ::assertStringContainsString ('admin/user/list?page=2 ' , $ content );
145+ self ::assertStringNotContainsString ('<td>User 11</td> ' , $ content );
145146 }
146147
147148 /**
@@ -153,10 +154,11 @@ public function testListSecondPageShowsRemainingUsers(): void
153154 $ controller ->setContainer ($ this ->createControllerContainer ());
154155
155156 $ response = $ controller ->list (new Request (['page ' => '2 ' ]));
157+ $ content = (string ) $ response ->getContent ();
156158
157159 self ::assertSame (Response::HTTP_OK , $ response ->getStatusCode ());
158- self ::assertStringContainsString ('user11@example.com ' , ( string ) $ response -> getContent () );
159- self ::assertStringNotContainsString ('user10@example.com ' , ( string ) $ response -> getContent () );
160+ self ::assertStringContainsString ('<td>User 11</td> ' , $ content );
161+ self ::assertStringNotContainsString ('<td>User 10</td> ' , $ content );
160162 }
161163
162164 /**
0 commit comments