Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

ApiTestCase does not work on Windows #82

Closed
cevou opened this issue Aug 3, 2016 · 3 comments
Closed

ApiTestCase does not work on Windows #82

cevou opened this issue Aug 3, 2016 · 3 comments

Comments

@cevou
Copy link

cevou commented Aug 3, 2016

There is a hard coded path in the ApiTestCase class:

file_put_contents(
    '/tmp/swagger.json',
    json_encode(self::$document->getDefinition(), JSON_PRETTY_PRINT)
);

The path to /tmp/swagger.json cannot be resolved on Windows.

johnknl added a commit that referenced this issue Aug 4, 2016
@johnknl
Copy link
Owner

johnknl commented Aug 4, 2016

Obviously that statement should not be, totally obsolete. It was already removed in master. I removed the statement in the 3.x branch as well. I will release a new patch version later today, in the mean time you can either remove the statement from your vendor directory or composer require kleijnweb/swagger-bundle=dev-3.x.

Having said that, please note that SwaggerBundle tested nor guaranteed to run properly on Windows, something which is not likely to change. I'll gladly fix minor issues reported though :)

@johnknl
Copy link
Owner

johnknl commented Aug 4, 2016

This has been included in v3.1.3 which is now latest stable.

@johnknl johnknl closed this as completed Aug 4, 2016
@cevou
Copy link
Author

cevou commented Aug 4, 2016

Thanks for fixing that. I already removed the code from the vendor directory and it worked after that.
Other than that everything works fine on Windows. I only use it on one of my PCs for development, so while it is not a problem to run tests in Travis, I didn't like that I was not able to execute them during development.
Great that it works now!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants