mirror of
https://github.com/kevinveenbirkenbach/coding-challenge-online-shop.git
synced 2025-09-10 20:07:12 +02:00
Solved user session bug
This commit is contained in:
@@ -26,6 +26,9 @@ class CoreTest extends TestCase
|
||||
protected function setUp():void{
|
||||
$this->core = new Core();
|
||||
$this->user = new User();
|
||||
$this->user->setId(1);
|
||||
$this->user->setEmail('test@mail.test');
|
||||
$this->user->setPasswordHashByPassword('passwort:)');
|
||||
$this->core->setUser($this->user);
|
||||
}
|
||||
|
||||
@@ -42,7 +45,7 @@ class CoreTest extends TestCase
|
||||
}
|
||||
|
||||
public function testSession():void{
|
||||
$this->assertEquals($this->core->getUser(), $_SESSION['user']);
|
||||
$this->assertEquals($this->core->getUser()->getPasswordHash(), $_SESSION['user']['hash']);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user