donatj / mock-webserver

Simple mock web server in PHP for unit testing.
MIT License
131 stars 21 forks source link

use MockWebServer tmp folder #24

Closed SilvioPahrig closed 4 years ago

donatj commented 4 years ago

When opening a pull request, it's helpful to explain why you're making these changes.

I'm curious what you're up to here. I specifically write to the system temporary directory because it's reliably writable, unlike other locations in the file system.

I could see adding an option to change the directory, but just writing to the working directory like this always isn't reasonable.

SilvioPahrig commented 4 years ago

Sorry that I don't write why I do that.

I see you create a folder MockWebServer first but than you don use it.

In line 188 you create a secound folder in tmp folder naming like the port ($tmpPath = $tmpDir . DIRECTORY_SEPARATOR . $this->port;) /tmp/8000

I change it to /tmp/MockWebServer/8000

donatj commented 4 years ago

AH, I mistook the .= for an =. Thank you for the fix!