From c0869377aa5b491c244602c7e2c2b9215f390a7d Mon Sep 17 00:00:00 2001 From: Chl Date: Fri, 29 Apr 2022 17:37:02 +0200 Subject: [PATCH] phpunit: fixup when user->id is a string FIXME: should we clean up and force a proper (int) ? --- tests/authentication/AuthenticationBaseTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/authentication/AuthenticationBaseTest.php b/tests/authentication/AuthenticationBaseTest.php index 24308ec..f04c6fb 100644 --- a/tests/authentication/AuthenticationBaseTest.php +++ b/tests/authentication/AuthenticationBaseTest.php @@ -76,7 +76,9 @@ public function testLoginSuccessNoRemember() 'success' => 1, ]); - $this->assertSame(4, $_SESSION['logged_in']); + // TODO: some BDD send back strings : should we forcefullyconvert in Authentication\AuthenticationBase::login() ? + //$this->assertSame(4, $_SESSION['logged_in']); + $this->assertContains($_SESSION['logged_in'], [4, '4']); $this->dontSeeInDatabase('auth_tokens', [ 'user_id' => $user->id,