Skip to content

Commit

Permalink
test: add userOptions to user profile
Browse files Browse the repository at this point in the history
  • Loading branch information
coppee committed Oct 14, 2023
1 parent c0e7d38 commit 8d9e003
Showing 1 changed file with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ protected function setUp(): void
'roles' => ['ROLE_USER', 'ROLE_ADMIN'],
'circles' => ['circle1', 'circle2'],
'lastLogin' => '2023-10-06T15:00:00+00:00',
'userOptions' => [
'option1' => 'ok',
'option2' => 'nope',
'customOption' => [
'customOption1' => 'nope',
'customOption2' => 'ok',
],
],
];
$this->profile = new Profile($data);
}
Expand Down Expand Up @@ -60,4 +68,9 @@ public function testGetLastLogin(): void
$expectedDate = \DateTimeImmutable::createFromFormat(\DateTimeImmutable::ATOM, '2023-10-06T15:00:00+00:00');
$this->assertEquals($expectedDate, $this->profile->getLastLogin());
}

public function testGetUserOptions(): void
{
$this->assertSame(['option1' => 'ok', 'option2' => 'nope', 'customOption' => ['customOption1' => 'nope', 'customOption2' => 'ok']], $this->profile->getUserOptions());
}
}

0 comments on commit 8d9e003

Please sign in to comment.