I never used in memory sqlite database but for testing i do use a sqlite database that is saved.
For that you should add
# app/config/config_test.yml
doctrine:
dbal:
default_connection: default
connections:
default:
driver: pdo_sqlite
path: %kernel.cache_dir%/test.db
To your test config (for me config_test.yml)
You should be able to change this to in memory according to the documentation
memory (boolean): True if the SQLite database should be in-memory (non-persistent). Mutually exclusive with path. path takes precedence.
So the config should then be
# app/config/config_test.yml
doctrine:
dbal:
default_connection: default
connections:
default:
driver: pdo_sqlite
memory: true