Skip to content

Commit

Permalink
Add test for default context in constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
RikudouSage committed Aug 24, 2021
1 parent 643aa2b commit 0a824b9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/Configuration/UnleashConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,21 @@ public function testConstructor()
{
$instance = new UnleashConfiguration('https://www.example.com/test', '', '');
self::assertEquals('https://www.example.com/test/', $instance->getUrl());

$context = new UnleashContext('147');
$instance = new UnleashConfiguration(
'https://www.example.com/test',
'',
'',
null,
0,
0,
false,
[],
false,
$context
);
self::assertEquals($context->getCurrentUserId(), $instance->getDefaultContext()->getCurrentUserId());
}

public function testSetUrl()
Expand Down

0 comments on commit 0a824b9

Please sign in to comment.