liip / liip/LiipTestFixturesBundle

Ability to load fixtures once before test class

Open
#88 2 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Currently we can load fixtures:

  • before each test case using PHPUnit setup()
  • once before all tests by customizing Symfony bootstrap process like I suggested in liip/LiipFunctionalTestBundle#303

Only the possibility to load fixtures once before test class is missing (like we do with PHPUnit setupBeforeClass()).

So, I would like to add this ability by implementing a simple flag and a $once parameter in methods like loadFixtureFiles() as follows:

public function loadFixtureFiles(array $paths = array(), $append = false, $omName = null, $registryName = 'doctrine', $once = false)

What do you think?

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

Locate the existing loadFixtureFiles() methods and review how fixtures are loaded during PHPUnit setup. Add coverage for loading fixtures once before a test class, with completion shown by the requested $once behavior and passing tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, symfony
Domain
database, testing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.