liip / liip/LiipTestFixturesBundle
Load fixture without a file path
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 178
- Forks
- 48
- PR merge metrics
- No merged PRs in 30d
Description
> from my understanding, we always have to define our fixture in a separate class,
> what i would really like is to define the fixture data inside my test function, (maybe not always but at least sometimes)
>
> i really like the idea of having a tight coupling between a test and the specific data it requires, to avoid creating some kind of global state that will be likely to break at scale.
>
> Is there any way to achieve that with your lib ? something like
>
> ```
> $this->databaseTool->loadFixturesInline(function(){ //define fixture code here... });
> ```
_Originally posted by @vulkanosaure in https://github.com/liip/LiipTestFixturesBundle/issues/64#issuecomment-1805054667_
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The request concerns the fixture-loading entry point illustrated as `$this->databaseTool->loadFixturesInline(...)`; no file or test path is named, so start by tracing the bundle's existing fixture-loading API. Done means a test can define fixture data inside the test function without a separate fixture class, with the inline behavior covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, symfony
- Domain
- database, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100