Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Authentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct(InspiredDeckAuth $authResource = null)
*
* @return mixed
*/
public function get(): array
public function get()
{
return Session::get($this->sessionKey, false);
}
Expand Down
4 changes: 1 addition & 3 deletions src/InspiredDeckAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ interface InspiredDeckAuth
{

/**
* Get the currently Authenticated User
*
* @return mixed
*/
public function get(): array;
public function get();
}
8 changes: 8 additions & 0 deletions tests/Unit/AuthenticationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,14 @@ public function can_authenticate(): void
$this->assertTrue($response);
}

/** @test **/
public function check_that_authentication_can_return_false(): void
{
$authentication = new Authentication();

$this->assertFalse($authentication->get());
}

/** @test **/
public function login_stores_authentication_in_session(): void
{
Expand Down