merge pull-requests locally

                    
|Q            |A   |
|---          |--- |
|Bug Fix?     |no  |
|New Feature? |yes |
|BC Breaks?   |no  |
|Deprecations?|no  |
|Fixed Tickets|#323|
|License      |MIT |
                    
**Work in progress**

- [x] Tests
- [x] Make usage of temp files more uniform (to much duplication right now)

Sent using [Gush](https://github.com/gushphp/gush)
We should switch to using only Prophecy for this test-class, but thats something for a follow-up PR.
So we can keep this PR focused on in this feature ;)