Skip to content

Commit

Permalink
Added getSessionID to the Session interface (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
boan-jfm authored Jan 11, 2018
1 parent a1bdbd9 commit 2472caa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,9 @@ public function get(string $type): SessionModel;
* @return void
*/
public function clear();

/**
* @return string
*/
public function getSessionID(): string;
}
2 changes: 2 additions & 0 deletions tests/unit/SessionMiddlewareCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ public function basicFunctionality(UnitTester $I)
$I->assertInstanceOf(Session::class, $session,
"SessionMiddleware adds an instance of Session to server request attributes");

$I->assertNotEmpty($session->getSessionID());

/** @var TestSessionModelA $model */
$model = $session->get(TestSessionModelA::class);

Expand Down

0 comments on commit 2472caa

Please sign in to comment.