Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.2] Fix cleanup after failing tests + generate files and folders in common subdirectory #12970

Merged
merged 3 commits into from
Apr 1, 2016

Conversation

sbusch
Copy link

@sbusch sbusch commented Apr 1, 2016

  1. all files and folders will be created in common subdirectory __DIR__/tmp
  2. moved cleanup code in common tearDown() method

(Next try, but I'm pretty sure this one can be merged w/o conflicts :-P)

Verified

This commit was signed with the committer’s verified signature.
Eomm Manuel Spigolon
…n subdirectory

Fix cleanup after failing tests by moving cleanup into new tearDown() method: old cleanup code was never reached when assertions fail. consecutive runs of PHPUnit resulted in many failing tests e.g. when foo/ was still present.

We're using tearDown() instead of try..finally in each test because its more concise. next task is to move all test files into one common base directory, so simplify the cleanup and make it more future proof when using other files than currently considered in cleanup.

Make cleanup more stable by moving all files created during tests from __DIR__ to new subfolder __DIR__/tmp by replacing __DIR__ with static::TEMP_DIR, which is defined as subfolder __DIR__/tmp.
@sbusch sbusch changed the title Fix cleanup after failing tests + generate files and folders in common subdirectory [5.2] Fix cleanup after failing tests + generate files and folders in common subdirectory Apr 1, 2016
Sebastian added 2 commits April 1, 2016 16:39

Verified

This commit was signed with the committer’s verified signature.
Eomm Manuel Spigolon
…and later to class variable

Verified

This commit was signed with the committer’s verified signature.
Eomm Manuel Spigolon
…rted in PHP 5.6 and later to ordinary member variable
@taylorotwell taylorotwell merged commit 78d29d5 into laravel:5.2 Apr 1, 2016
@sbusch sbusch deleted the fix-file-system-test-cleanup branch April 1, 2016 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants