client-php
client-php copied to clipboard
phpunit does not run by README
Hi. I've tried running tests by README but it gives an error about missing api key. I guess it should work out of the box for tests run? 🤔
terminal: php71 vendor/bin/phpunit --verbose
PHPUnit 4.8.36 by Sebastian Bergmann and contributors.
Runtime: PHP 7.1.31 with Xdebug 2.7.2
Configuration: ~/pipedrive/pipedrive/phpunit.xml
EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
Time: 354 ms, Memory: 8.00MB
There were 42 errors:
1) Pipedrive\Tests\ActivitiesControllerTest::testTestGetAllActivitiesAssignedToAParticularUser
Exception: Client is not authorized. An OAuth token or an API token is needed to make API calls.
~/pipedrive/pipedrive/src/OAuthManager.php:150
~/pipedrive/pipedrive/src/Controllers/ActivitiesController.php:128
~/pipedrive/pipedrive/tests/Controllers/ActivitiesControllerTest.php:64
2) Pipedrive\Tests\ActivityFieldsControllerTest::testTestGetAllFieldsForAnActivity
Exception: Client is not authorized. An OAuth token or an API token is needed to make API calls.
~/pipedrive/pipedrive/src/OAuthManager.php:150
~/pipedrive/pipedrive/src/Controllers/ActivityFieldsController.php:56
~/pipedrive/pipedrive/tests/Controllers/ActivityFieldsControllerTest.php:53
...
Hello @aistis- . Please ignore those tests for now. They are more for internal use. We will work on this in future versions on library to give possibility to open source community to check and write tests as well.
Thanks for your feedback.