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

Commit

Permalink
🛀 test suite overhaul (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
codemasher committed Mar 18, 2024
1 parent 154eef3 commit ec10b38
Show file tree
Hide file tree
Showing 118 changed files with 1,452 additions and 2,454 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,15 @@
"ext-simplexml": "*",
"ext-sodium": "*",
"ext-zlib": "*",
"chillerlan/php-http-message-utils": "^2.1",
"chillerlan/php-http-message-utils": "^2.2",
"chillerlan/php-settings-container": "^3.2",
"psr/http-client": "^1.0",
"psr/http-message": "^1.1 || ^2.0",
"psr/log": "^1.1 || ^2.0 || ^3.0"
},
"require-dev": {
"chillerlan/php-dotenv": "^3.0",
"chillerlan/phpunit-http": "^1.0",
"guzzlehttp/guzzle": "^7.8",
"monolog/monolog": "^3.5",
"phan/phan": "^5.4",
Expand Down
31 changes: 23 additions & 8 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,20 @@
cacheDirectory=".build/phpunit.cache"
cacheResultFile=".build/phpunit.result.cache"
colors="true"
beStrictAboutCoverageMetadata="true"
>
<testsuites>
<testsuite name="php-oauth-core test suite">
<directory>tests</directory>
<exclude>tests/Helpers</exclude>
<testsuite name="php-oauth-core">
<directory>tests/Core</directory>
</testsuite>
<testsuite name="php-oauth-core token storage">
<directory>tests/Core</directory>
</testsuite>
<testsuite name="php-oauth-providers unit tests">
<directory>tests/Providers/Unit</directory>
</testsuite>
<testsuite name="php-oauth-providers live API tests">
<directory>tests/Providers/Live</directory>
</testsuite>
</testsuites>
<source>
Expand All @@ -23,18 +32,24 @@
<xml outputDirectory=".build/coverage/coverage-xml"/>
</report>
</coverage>
<groups>
<exclude>
<!--
<group>slow</group>
<group>shortTokenExpiry</group>
-->
<group>providerLiveTest</group>
</exclude>
</groups>
<php>
<!-- whether the test runs on CI - set to false to allow live API tests to run -->
<const name="TEST_IS_CI" value="true"/>
<!-- the config directory, where .env, cacert.pem and test oauth tokens reside, relative from project root -->
<const name="TEST_CFGDIR" value="./config"/>
<const name="TEST_CFGDIR" value="config"/>
<!-- the filename of your .env file -->
<const name="TEST_ENVFILE" value=".env_example"/>
<!-- the http client factory for live api tests -->
<!--
<const name="TEST_CLIENT_FACTORY" value="chillerlan\OAuthTest\Helpers\ChillerlanHttpClientFactory"/>
-->
<const name="TEST_CLIENT_FACTORY" value="chillerlan\OAuthTest\Helpers\GuzzleHttpClientFactory"/>
<const name="HTTP_CLIENT_FACTORY" value="chillerlan\PHPUnitHttp\GuzzleHttpClientFactory"/>
<!-- PSR-17 factories to use in tests -->
<const name="REQUEST_FACTORY" value="GuzzleHttp\Psr7\HttpFactory"/>
<const name="RESPONSE_FACTORY" value="GuzzleHttp\Psr7\HttpFactory"/>
Expand Down
3 changes: 2 additions & 1 deletion tests/Core/AccessTokenTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
use chillerlan\OAuth\Core\AccessToken;
use PHPUnit\Framework\Attributes\{DataProvider, Group};
use PHPUnit\Framework\TestCase;
use function sleep, time;
use function sleep;
use function time;

/**
* Tests the AccessToken class
Expand Down
26 changes: 0 additions & 26 deletions tests/Core/DummyOAuth2BasicProvider.php

This file was deleted.

56 changes: 0 additions & 56 deletions tests/Core/DummyOAuth2TestBasic.php

This file was deleted.

25 changes: 0 additions & 25 deletions tests/Core/OAuth1Test.php

This file was deleted.

25 changes: 0 additions & 25 deletions tests/Core/OAuth2Test.php

This file was deleted.

89 changes: 0 additions & 89 deletions tests/Core/RequestTest.php

This file was deleted.

33 changes: 0 additions & 33 deletions tests/Core/RequestTestProvider.php

This file was deleted.

31 changes: 0 additions & 31 deletions tests/Helpers/ChillerlanHttpClientFactory.php

This file was deleted.

Loading

0 comments on commit ec10b38

Please sign in to comment.