Nimut / testing-framework

TYPO3 testing framework that provides base classes and configuration for PHPUnit tests
GNU General Public License v2.0
52 stars 25 forks source link

Linked fixtures are deleted before last test of a class #125

Closed ndq1 closed 4 years ago

ndq1 commented 4 years ago

Hi,

I have (nimut) phpunit testing implemented in my project. Recently I noticed that after the first test ran the linked test/fixture folder (by $pathsToLinkInTestInstance) has been deleted. So all the tests afterwards are failing due to missing fixtures.

After some research I found out that it is related to this bugfix. I guess this modification is logical.

But then again is there a way to prevent a teardown of the linked files/folders when not all tests from that class has been executed?

Thanks for the help

ndq1 commented 4 years ago

Hi @IchHabRecht,

Sorry to disturb you but just for understanding it correctly. The loop which removes the directory/link could be completely removed from the tearDown() function? Since the linked files/folders are used for the test. So no new "import" are necessary.

IchHabRecht commented 4 years ago

Hi @ndq1,

I'm not sure why the tearDown was added and need to check the code.

ndq1 commented 4 years ago

Hi @IchHabRecht,

I just created a pull request so I can use it in my project. Also you can merge the change if it is ok for you.

Cheers

IchHabRecht commented 4 years ago

Hi @ndq1,

As you can see I already created a pull request against the current stable (released) 4.x branch that got merged already. I'm closing this issue now as it is resolved.