how to launch the test ?
Grummfy opened this issue · 2 comments
Grummfy commented
hello,
When I run vendor/bin/phpunit tests I have several failed. Perhaps I miss some parameters?
vendor/bin/phpunit tests/
PHPUnit 9.2.3 by Sebastian Bergmann and contributors.
EESESSSSSSESSSESSSSSESSSSESSSESSSSEESSSSESSSSSESSSSSSESSSESSSS 62 / 62 (100%)
Time: 00:10.284, Memory: 6.00 MB
There were 14 errors:
1) NylasTest\AccountTest::testGetAccount
Nylas\Exceptions\NylasException: No valid API key or access_token provided. in /var/www/src/Request/Sync.php:45
Stack trace:
#0 /var/www/src/Accounts/Account.php(65): Nylas\Request\Sync->get()
#1 /var/www/src/Utilities/Options.php(108): Nylas\Accounts\Account->getAccount()
#2 /var/www/src/Utilities/Options.php(90): Nylas\Utilities\Options->setAccessToken()
#3 /var/www/src/Client.php(56): Nylas\Utilities\Options->__construct()
#4 /var/www/tests/Abs.php(43): Nylas\Client->__construct()
#5 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(583): NylasTest\Abs::setUpBeforeClass()
#6 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(638): PHPUnit\Framework\TestSuite->run()
#7 /var/www/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(651): PHPUnit\Framework\TestSuite->run()
#8 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(108): PHPUnit\TextUI\TestRunner->run()
#9 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(68): PHPUnit\TextUI\Command->run()
#10 /var/www/vendor/phpunit/phpunit/phpunit(61): PHPUnit\TextUI\Command::main()
#11 {main}
2) NylasTest\CalendarTest::testGetOAuthAuthorize
Nylas\Exceptions\NylasException: No valid API key or access_token provided. in /var/www/src/Request/Sync.php:45
Stack trace:
#0 /var/www/src/Accounts/Account.php(65): Nylas\Request\Sync->get()
#1 /var/www/src/Utilities/Options.php(108): Nylas\Accounts\Account->getAccount()
#2 /var/www/src/Utilities/Options.php(90): Nylas\Utilities\Options->setAccessToken()
#3 /var/www/src/Client.php(56): Nylas\Utilities\Options->__construct()
#4 /var/www/tests/Abs.php(43): Nylas\Client->__construct()
#5 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(583): NylasTest\Abs::setUpBeforeClass()
#6 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(638): PHPUnit\Framework\TestSuite->run()
#7 /var/www/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(651): PHPUnit\Framework\TestSuite->run()
#8 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(108): PHPUnit\TextUI\TestRunner->run()
#9 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(68): PHPUnit\TextUI\Command->run()
#10 /var/www/vendor/phpunit/phpunit/phpunit(61): PHPUnit\TextUI\Command::main()
#11 {main}
3) NylasTest\ContactTest::testGetContactsList
Nylas\Exceptions\NylasException: No valid API key or access_token provided. in /var/www/src/Request/Sync.php:45
Stack trace:
#0 /var/www/src/Accounts/Account.php(65): Nylas\Request\Sync->get()
#1 /var/www/src/Utilities/Options.php(108): Nylas\Accounts\Account->getAccount()
#2 /var/www/src/Utilities/Options.php(90): Nylas\Utilities\Options->setAccessToken()
#3 /var/www/src/Client.php(56): Nylas\Utilities\Options->__construct()
#4 /var/www/tests/Abs.php(43): Nylas\Client->__construct()
#5 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(583): NylasTest\Abs::setUpBeforeClass()
#6 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(638): PHPUnit\Framework\TestSuite->run()
#7 /var/www/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(651): PHPUnit\Framework\TestSuite->run()
#8 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(108): PHPUnit\TextUI\TestRunner->run()
#9 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(68): PHPUnit\TextUI\Command->run()
#10 /var/www/vendor/phpunit/phpunit/phpunit(61): PHPUnit\TextUI\Command::main()
#11 {main}
4) NylasTest\DeltaTest::testGetLatestCursor
Nylas\Exceptions\NylasException: No valid API key or access_token provided. in /var/www/src/Request/Sync.php:45
Stack trace:
#0 /var/www/src/Accounts/Account.php(65): Nylas\Request\Sync->get()
#1 /var/www/src/Utilities/Options.php(108): Nylas\Accounts\Account->getAccount()
#2 /var/www/src/Utilities/Options.php(90): Nylas\Utilities\Options->setAccessToken()
#3 /var/www/src/Client.php(56): Nylas\Utilities\Options->__construct()
#4 /var/www/tests/Abs.php(43): Nylas\Client->__construct()
#5 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(583): NylasTest\Abs::setUpBeforeClass()
#6 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(638): PHPUnit\Framework\TestSuite->run()
#7 /var/www/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(651): PHPUnit\Framework\TestSuite->run()
#8 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(108): PHPUnit\TextUI\TestRunner->run()
#9 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(68): PHPUnit\TextUI\Command->run()
#10 /var/www/vendor/phpunit/phpunit/phpunit(61): PHPUnit\TextUI\Command::main()
#11 {main}
5) NylasTest\DraftTest::testGetDraftList
Nylas\Exceptions\NylasException: No valid API key or access_token provided. in /var/www/src/Request/Sync.php:45
Stack trace:
#0 /var/www/src/Accounts/Account.php(65): Nylas\Request\Sync->get()
#1 /var/www/src/Utilities/Options.php(108): Nylas\Accounts\Account->getAccount()
#2 /var/www/src/Utilities/Options.php(90): Nylas\Utilities\Options->setAccessToken()
#3 /var/www/src/Client.php(56): Nylas\Utilities\Options->__construct()
#4 /var/www/tests/Abs.php(43): Nylas\Client->__construct()
#5 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(583): NylasTest\Abs::setUpBeforeClass()
#6 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(638): PHPUnit\Framework\TestSuite->run()
#7 /var/www/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(651): PHPUnit\Framework\TestSuite->run()
#8 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(108): PHPUnit\TextUI\TestRunner->run()
#9 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(68): PHPUnit\TextUI\Command->run()
#10 /var/www/vendor/phpunit/phpunit/phpunit(61): PHPUnit\TextUI\Command::main()
#11 {main}
6) NylasTest\EventTest::testGetEventList
Nylas\Exceptions\NylasException: No valid API key or access_token provided. in /var/www/src/Request/Sync.php:45
Stack trace:
#0 /var/www/src/Accounts/Account.php(65): Nylas\Request\Sync->get()
#1 /var/www/src/Utilities/Options.php(108): Nylas\Accounts\Account->getAccount()
#2 /var/www/src/Utilities/Options.php(90): Nylas\Utilities\Options->setAccessToken()
#3 /var/www/src/Client.php(56): Nylas\Utilities\Options->__construct()
#4 /var/www/tests/Abs.php(43): Nylas\Client->__construct()
#5 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(583): NylasTest\Abs::setUpBeforeClass()
#6 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(638): PHPUnit\Framework\TestSuite->run()
#7 /var/www/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(651): PHPUnit\Framework\TestSuite->run()
#8 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(108): PHPUnit\TextUI\TestRunner->run()
#9 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(68): PHPUnit\TextUI\Command->run()
#10 /var/www/vendor/phpunit/phpunit/phpunit(61): PHPUnit\TextUI\Command::main()
#11 {main}
7) NylasTest\FileTest::testGetFileList
Nylas\Exceptions\NylasException: No valid API key or access_token provided. in /var/www/src/Request/Sync.php:45
Stack trace:
#0 /var/www/src/Accounts/Account.php(65): Nylas\Request\Sync->get()
#1 /var/www/src/Utilities/Options.php(108): Nylas\Accounts\Account->getAccount()
#2 /var/www/src/Utilities/Options.php(90): Nylas\Utilities\Options->setAccessToken()
#3 /var/www/src/Client.php(56): Nylas\Utilities\Options->__construct()
#4 /var/www/tests/Abs.php(43): Nylas\Client->__construct()
#5 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(583): NylasTest\Abs::setUpBeforeClass()
#6 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(638): PHPUnit\Framework\TestSuite->run()
#7 /var/www/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(651): PHPUnit\Framework\TestSuite->run()
#8 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(108): PHPUnit\TextUI\TestRunner->run()
#9 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(68): PHPUnit\TextUI\Command->run()
#10 /var/www/vendor/phpunit/phpunit/phpunit(61): PHPUnit\TextUI\Command::main()
#11 {main}
8) NylasTest\FolderTest::testGetFolderList
Nylas\Exceptions\NylasException: No valid API key or access_token provided. in /var/www/src/Request/Sync.php:45
Stack trace:
#0 /var/www/src/Accounts/Account.php(65): Nylas\Request\Sync->get()
#1 /var/www/src/Utilities/Options.php(108): Nylas\Accounts\Account->getAccount()
#2 /var/www/src/Utilities/Options.php(90): Nylas\Utilities\Options->setAccessToken()
#3 /var/www/src/Client.php(56): Nylas\Utilities\Options->__construct()
#4 /var/www/tests/Abs.php(43): Nylas\Client->__construct()
#5 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(583): NylasTest\Abs::setUpBeforeClass()
#6 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(638): PHPUnit\Framework\TestSuite->run()
#7 /var/www/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(651): PHPUnit\Framework\TestSuite->run()
#8 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(108): PHPUnit\TextUI\TestRunner->run()
#9 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(68): PHPUnit\TextUI\Command->run()
#10 /var/www/vendor/phpunit/phpunit/phpunit(61): PHPUnit\TextUI\Command::main()
#11 {main}
9) NylasTest\HostedTest::testGetOAuthAuthorize
Nylas\Exceptions\NylasException: No valid API key or access_token provided. in /var/www/src/Request/Sync.php:45
Stack trace:
#0 /var/www/src/Accounts/Account.php(65): Nylas\Request\Sync->get()
#1 /var/www/src/Utilities/Options.php(108): Nylas\Accounts\Account->getAccount()
#2 /var/www/src/Utilities/Options.php(90): Nylas\Utilities\Options->setAccessToken()
#3 /var/www/src/Client.php(56): Nylas\Utilities\Options->__construct()
#4 /var/www/tests/Abs.php(43): Nylas\Client->__construct()
#5 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(583): NylasTest\Abs::setUpBeforeClass()
#6 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(638): PHPUnit\Framework\TestSuite->run()
#7 /var/www/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(651): PHPUnit\Framework\TestSuite->run()
#8 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(108): PHPUnit\TextUI\TestRunner->run()
#9 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(68): PHPUnit\TextUI\Command->run()
#10 /var/www/vendor/phpunit/phpunit/phpunit(61): PHPUnit\TextUI\Command::main()
#11 {main}
10) NylasTest\LabelTest::testGetLabelList
Nylas\Exceptions\NylasException: No valid API key or access_token provided. in /var/www/src/Request/Sync.php:45
Stack trace:
#0 /var/www/src/Accounts/Account.php(65): Nylas\Request\Sync->get()
#1 /var/www/src/Utilities/Options.php(108): Nylas\Accounts\Account->getAccount()
#2 /var/www/src/Utilities/Options.php(90): Nylas\Utilities\Options->setAccessToken()
#3 /var/www/src/Client.php(56): Nylas\Utilities\Options->__construct()
#4 /var/www/tests/Abs.php(43): Nylas\Client->__construct()
#5 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(583): NylasTest\Abs::setUpBeforeClass()
#6 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(638): PHPUnit\Framework\TestSuite->run()
#7 /var/www/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(651): PHPUnit\Framework\TestSuite->run()
#8 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(108): PHPUnit\TextUI\TestRunner->run()
#9 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(68): PHPUnit\TextUI\Command->run()
#10 /var/www/vendor/phpunit/phpunit/phpunit(61): PHPUnit\TextUI\Command::main()
#11 {main}
11) NylasTest\ManageTest::testGetAccountList
Nylas\Exceptions\NylasException: No valid API key or access_token provided. in /var/www/src/Request/Sync.php:45
Stack trace:
#0 /var/www/src/Accounts/Account.php(65): Nylas\Request\Sync->get()
#1 /var/www/src/Utilities/Options.php(108): Nylas\Accounts\Account->getAccount()
#2 /var/www/src/Utilities/Options.php(90): Nylas\Utilities\Options->setAccessToken()
#3 /var/www/src/Client.php(56): Nylas\Utilities\Options->__construct()
#4 /var/www/tests/Abs.php(43): Nylas\Client->__construct()
#5 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(583): NylasTest\Abs::setUpBeforeClass()
#6 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(638): PHPUnit\Framework\TestSuite->run()
#7 /var/www/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(651): PHPUnit\Framework\TestSuite->run()
#8 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(108): PHPUnit\TextUI\TestRunner->run()
#9 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(68): PHPUnit\TextUI\Command->run()
#10 /var/www/vendor/phpunit/phpunit/phpunit(61): PHPUnit\TextUI\Command::main()
#11 {main}
12) NylasTest\MessageTest::testGetMessagesList
Nylas\Exceptions\NylasException: No valid API key or access_token provided. in /var/www/src/Request/Sync.php:45
Stack trace:
#0 /var/www/src/Accounts/Account.php(65): Nylas\Request\Sync->get()
#1 /var/www/src/Utilities/Options.php(108): Nylas\Accounts\Account->getAccount()
#2 /var/www/src/Utilities/Options.php(90): Nylas\Utilities\Options->setAccessToken()
#3 /var/www/src/Client.php(56): Nylas\Utilities\Options->__construct()
#4 /var/www/tests/Abs.php(43): Nylas\Client->__construct()
#5 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(583): NylasTest\Abs::setUpBeforeClass()
#6 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(638): PHPUnit\Framework\TestSuite->run()
#7 /var/www/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(651): PHPUnit\Framework\TestSuite->run()
#8 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(108): PHPUnit\TextUI\TestRunner->run()
#9 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(68): PHPUnit\TextUI\Command->run()
#10 /var/www/vendor/phpunit/phpunit/phpunit(61): PHPUnit\TextUI\Command::main()
#11 {main}
13) NylasTest\ThreadTest::testGetThreadList
Nylas\Exceptions\NylasException: No valid API key or access_token provided. in /var/www/src/Request/Sync.php:45
Stack trace:
#0 /var/www/src/Accounts/Account.php(65): Nylas\Request\Sync->get()
#1 /var/www/src/Utilities/Options.php(108): Nylas\Accounts\Account->getAccount()
#2 /var/www/src/Utilities/Options.php(90): Nylas\Utilities\Options->setAccessToken()
#3 /var/www/src/Client.php(56): Nylas\Utilities\Options->__construct()
#4 /var/www/tests/Abs.php(43): Nylas\Client->__construct()
#5 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(583): NylasTest\Abs::setUpBeforeClass()
#6 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(638): PHPUnit\Framework\TestSuite->run()
#7 /var/www/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(651): PHPUnit\Framework\TestSuite->run()
#8 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(108): PHPUnit\TextUI\TestRunner->run()
#9 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(68): PHPUnit\TextUI\Command->run()
#10 /var/www/vendor/phpunit/phpunit/phpunit(61): PHPUnit\TextUI\Command::main()
#11 {main}
14) NylasTest\WebhookTest::testGetWebhookList
Nylas\Exceptions\NylasException: No valid API key or access_token provided. in /var/www/src/Request/Sync.php:45
Stack trace:
#0 /var/www/src/Accounts/Account.php(65): Nylas\Request\Sync->get()
#1 /var/www/src/Utilities/Options.php(108): Nylas\Accounts\Account->getAccount()
#2 /var/www/src/Utilities/Options.php(90): Nylas\Utilities\Options->setAccessToken()
#3 /var/www/src/Client.php(56): Nylas\Utilities\Options->__construct()
#4 /var/www/tests/Abs.php(43): Nylas\Client->__construct()
#5 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(583): NylasTest\Abs::setUpBeforeClass()
#6 /var/www/vendor/phpunit/phpunit/src/Framework/TestSuite.php(638): PHPUnit\Framework\TestSuite->run()
#7 /var/www/vendor/phpunit/phpunit/src/TextUI/TestRunner.php(651): PHPUnit\Framework\TestSuite->run()
#8 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(108): PHPUnit\TextUI\TestRunner->run()
#9 /var/www/vendor/phpunit/phpunit/src/TextUI/Command.php(68): PHPUnit\TextUI\Command->run()
#10 /var/www/vendor/phpunit/phpunit/phpunit(61): PHPUnit\TextUI\Command::main()
#11 {main}
ERRORS!
Tests: 62, Assertions: 0, Errors: 14, Skipped: 48.
lanlin commented
@Grummfy sorry late to respond. forgive me lazy for the testing, current unit tests have many hard code parameters inside, and must use a real nylas account to testing. the account info needs to be configured at tests/Abs.php first, then launch the test.
Grummfy commented
thanks, I have create a PR to show it ;)