Closed korzol closed 5 years ago
Great job! Can you also add in the changes in the tests?
This PR should fix #25 image bug
Will be glad but first I need to learn how it works and where to make changes :)
Added image upload to unit tests. But testing fails if I run it as is. Complain is:
Fatal error: Trait 'LauLamanApps\IzettleApi\Tests\Unit\MockeryAssertionTrait' not found in ..izettle/vendor/laulamanapps/izettle-api/tests/Unit/GuzzleIzettleClientTest.php on line 24
Checked path and namespaces, even added
require_once 'MockeryAssertionTrait.php';
to GuzzleIzettleClientTest.php but seems nothing works.
PHP 7.2.15. iZettleApi has been installed with composer
Any thoughts ?
Hi @korzol Great job!
Can you tell me how you are running the tests? are you using the Make commands?
I've checkout your pr locally and have come to the following conclusion:
LauLamanApps\IzettleApi\Tests\Integration\Client\ImageClientTest:26
We need to enter a real url now. this will fix this tests. i've tried with http://example.com/image.jpg
LauLamanApps\IzettleApi\Tests\Unit\Client\ImageClientTest:27
If you run with the make command it should work. You can also check if you have mockery installed in your vendor directory.
i've also left you some more feedback. 🤗
Hi @korzol
Are you able to finish this PR?
Hello @korzol,
Is there any news about this PR ?
Closed due to no response. i might fix this myself later on
Hello Thank you! You did a great job! iZettle updated their API documentation. At least new there is correct URL to send images to. Also some small changes like uuid in ImageClient was null. Also now they require image type even for url, so I had to implement it somehow
Have a good day