orchestral / testbench

Laravel Testing Helper for Packages Development
https://packages.tools/testbench
MIT License
2.1k stars 136 forks source link

Livewire failing on testbench 9 #391

Closed joshhanley closed 8 months ago

joshhanley commented 8 months ago

Description:

Running Livewire's test suite using L11/Orchestra9/TestbenchDusk9 is throwing the below error (wasn't sure if this was better here or in testbench-dusk).

If I downgrade to L10/Testbench8/TestbenchDusk8, everything runs happily.

Haven't had a chance to dig into it yet, but was wondering if you had any insights as to what might be happening?

image

Steps To Reproduce:

Clone a new copy of Livewire repo, update chrome driver and run php unit:

git clone git@github.com:livewire/livewire.git livewire-L11-test

cd livewire-L11-test

composer install

./vendor/bin/dusk-updater update

./vendor/bin/phpunit

Should result in a lot of the dusk tests throwing the above error.

Thanks in advance!

crynobone commented 8 months ago

Laravel 11 will change the default session driver from file to database. You can either add the environment variable to use file or update database migrations to include sessions table.

joshhanley commented 8 months ago

@crynobone ah ok thanks for the heads up. I will give it a go and report back.

joshhanley commented 8 months ago

@crynobone adding <env name="SESSION_DRIVER" value="file"/> to phpunit.xml.dist fixed the issue. Thanks for the quick response!