Open bjmrey opened 7 years ago
Thank you. I am having the same issue with Laravel 5.3.
Your temporary solution helps, at least the tests can run as usual.
Could you please tell me what happens if you do a
private function startSession()
{
dd(session_status());
if ( ! $this->isStarted())
{
@session_start();
}
}
?
Hi @antonioribeiro, just run your code and get a return value 1
.
Sorry, I think we shoul also test:
private function startSession()
{
if ( ! $this->isStarted())
{
dd(session_status());
@session_start();
}
}
Those are the values we are looking for
Oops it seems I messed up with the tracker in both dev and production environment so I reverted the code to a previous commit. Will update you when I get back to the same state again..
Did you try to run it (locally) with dd()
inside that if()
?
Hi @antonioribeiro, I'm having the same issue.
I have a fresh 5.6 Laravel installation with your tracker package and the default example tests[1] and I get the same error when I run phpunit.
I've include dd(session_status()) inside the if() and the return is 1 in the browser and inside the phpunit test.
I hope it could help :)
[1]
public function testExample()
{
$response = $this->get('/');
$response->assertStatus(200);
}
After upgrading to Laravel 5.4 running phpunit outputs the error below.
I've solved it temporarily by adding @ before session_start() in src/PhpSession.php, but I'm not quite sure what's going on and whether the issue comes from this package or from my setup.