liip / liip/LiipFunctionalTestBundle

Purge not resetting Ids when using LoadFixtures with Doctrine

Open
#167 0 comments 2 reactions 0 assignees View on GitHub
move-to-fixtures-repository
Dominant language
PHP
Stars
648
Forks
179
PR merge metrics
No merged PRs in 30d

Description

I expect to work with certain Ids within my tests but doing

```
$fixturePath = "@Bundle/DataFixtures/ORM/Test/yml/";

$fixtures = array(
$fixturePath . 'AuthUser.yml',
);

$this->loadFixtureFiles($fixtures);
```

Does not resets the ID on AuthUser, causing it to grow exponentially with every test wich not ideal, with SQLlite there's an implicit datasedrop to solve that

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing loadFixtureFiles with Doctrine-backed tests and inspect how purge state is handled between fixture loads. Compare the behavior with SQLite's database reset behavior; done means test fixture IDs reset consistently between tests without breaking the existing SQLite case.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.