phpstan level 8 preparation

This commit is contained in:
Spine
2025-07-28 16:55:16 +02:00
parent 889766f032
commit 3e9b2bcb4f
37 changed files with 560 additions and 330 deletions
+14 -5
View File
@@ -369,11 +369,20 @@ class UserManagerTest extends TestCase {
$pmMan = new Manager\PM($receiver->user());
$this->assertEquals(1, $receiver->messageTotal(), 'uman-custom-pm-count');
$list = $receiver->messageList($pmMan, 2, 0);
$this->assertEquals('phpunit sendCustomPMTest', $list[0]->subject(), 'uman-custom-pm-subject');
$this->assertEquals(
'phpunit sendCustomPMTest',
$list[0]->subject(),
'uman-custom-pm-subject'
);
$postlist = $list[0]->postlist(10, 0);
$postId = $postlist[0]['id'];
$pm = $pmMan->findByPostId($postId);
$this->assertStringContainsString($this->userList[2]->username(), $pm->postBody($postId), 'uman-custom-pm-body');
$this->assertInstanceOf(PM::class, $pm, 'uman-found-pm');
$this->assertStringContainsString(
$this->userList[2]->username(),
(string)$pm->postBody($postId),
'uman-custom-pm-body'
);
}
public function testUserclassFlush(): void {
@@ -403,9 +412,9 @@ class UserManagerTest extends TestCase {
public function testUserFind(): void {
$manager = new Manager\User();
$this->assertEquals(
$this->userList[0]->id,
$manager->findByEmail($this->userList[0]->email())->id,
$this->assertInstanceOf(
User::class,
$manager->findByEmail($this->userList[0]->email()),
'userman-find-by-email'
);
}