userMan = new \Gazelle\Manager\User;
}
public function testProfile(): void {
global $Viewer;
$Viewer = $this->userMan->find('@admin');
$user = $this->userMan->find('@user');
$PRL = new \Gazelle\User\PermissionRateLimit($user);
$sidebar = Gazelle\Util\Twig::factory()->render('user/sidebar.twig', [
'applicant' => new \Gazelle\Manager\Applicant,
'invite_source' => 'invsrc',
'user' => $user,
'viewer' => $Viewer,
]);
$this->assertEquals(
substr_count($sidebar, '
') + substr_count($sidebar, ''),
substr_count($sidebar, ''),
'user-sidebar-general'
);
$header = Gazelle\Util\Twig::factory()->render('user/header.twig', [
'badge_list' => (new \Gazelle\User\Privilege($Viewer))->badgeList(),
'bonus' => new Gazelle\User\Bonus($user),
'donor' => new Gazelle\User\Donor($user),
'freeleech' => [
'item' => [],
'other' => null,
],
'friend' => new Gazelle\User\Friend($Viewer),
'preview_user' => $user,
'user' => $user,
'userMan' => $this->userMan,
'viewer' => $Viewer,
]);
$this->assertStringContainsString('