LiipTestFixturesBundle | bundles enables efficient loading of Doctrine fixtures | Web Framework library
kandi X-RAY | LiipTestFixturesBundle Summary
kandi X-RAY | LiipTestFixturesBundle Summary
This Bundle provides base classes for functional tests to assist in setting up test-databases and loading fixtures.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Load fixtures .
- Restores migrations .
- Get configuration tree builder .
- Create the database if not exists .
- Locates resources .
- Checks if the given backup is up to date .
- Get a database tool .
- Get all databases .
- Get the database name .
- Get a fixture loader .
LiipTestFixturesBundle Key Features
LiipTestFixturesBundle Examples and Code Snippets
Community Discussions
Trending Discussions on LiipTestFixturesBundle
QUESTION
I'm trying to use Liip test bundle to load fixtures from code using the loadFixtures() method from FixturesTrait However, I need to exclude the RESOURCE table that I don't want to be dropped in the process. If I understand correctly, this should be easy using the setExcludedDoctrineTables method according to the doc https://github.com/liip/LiipTestFixturesBundle/blob/master/doc/database.md
Unfortunately, when I run this code, the table RESOURCES gets dropped with all the others.
Can anybody see why ?
not sure if that's relevant but I'm using a mysql db in a separate docker container.
...
ANSWER
Answered 2020-Dec-21 at 17:05Answering my own question as I just found out the issue. Sometimes a good night of sleep is all you need :)
So this code is actually working. The table RESOURCES got dropped because the setUp method was redefined in the concrete class implementing the test and that redefinition included another call to loadFixtures, but for a different data class and without the exclusion :
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install LiipTestFixturesBundle
PHP requires the Visual C runtime (CRT). The Microsoft Visual C++ Redistributable for Visual Studio 2019 is suitable for all these PHP versions, see visualstudio.microsoft.com. You MUST download the x86 CRT for PHP x86 builds and the x64 CRT for PHP x64 builds. The CRT installer supports the /quiet and /norestart command-line switches, so you can also script it.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page