liip / liip/LiipTestFixturesBundle

Option memory of SQLite not working

Open
#95 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
178
Forks
48
PR merge metrics
No merged PRs in 30d

Description

Hello, in Symfony 3.4, I tried using the `memory` option in order to make my tests faster but an error occurred:

```
1) Tests\AppBundle\Controller\DefaultControllerTest::testIndex
copy(mydb): failed to open stream: No such file or directory
```

My test config is the following:

```
imports:
- { resource: config_dev.yml }

framework:
test: ~
session:
storage_id: session.storage.mock_file
name: MOCKSESSION
profiler:
collect: false

web_profiler:
toolbar: false
intercept_redirects: false

swiftmailer:
disable_delivery: true

liip_functional_test:
cache_db:
sqlite: liip_functional_test.services_database_backup.sqlite

doctrine:
dbal:
default_connection: default
connections:
default:
driver: pdo_sqlite
memory: true
security:
firewalls:
main:
http_basic: ~
```

Thank you.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported Symfony 3.4 configuration, focusing on the liip_functional_test cache_db SQLite service and the Doctrine DBAL memory option. Trace the source of the `copy(mydb)` failure and verify that functional tests using an in-memory SQLite database run without attempting to copy a file.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, sqlite, symfony
Domain
database, testing
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.