Skip to content

Commit

Permalink
Update phpunit + fix phpunit config
Browse files Browse the repository at this point in the history
  • Loading branch information
gdebrauwer committed Mar 15, 2024
1 parent c2c6d98 commit 87460ef
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 23 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"friendsofphp/php-cs-fixer": "^3.0",
"jasonmccreary/laravel-test-assertions": "^2.3",
"orchestra/testbench": "^7.0|^8.0|^9.0",
"phpunit/phpunit": "^9.1",
"phpunit/phpunit": "^10.0",
"squizlabs/php_codesniffer": "^3.6"
},
"autoload": {
Expand Down
26 changes: 5 additions & 21 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,31 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
verbose="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd" backupGlobals="false" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnFailure="false" cacheResult="true" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<testsuites>
<testsuite name="Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<source>
<include>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
<logging>
<log type="tap" target="build/report.tap"/>
<log type="junit" target="build/report.junit.xml"/>
<log type="coverage-html" target="build/coverage" charset="UTF-8" yui="true" highlight="true"/>
<log type="coverage-text" target="build/coverage.txt"/>
<log type="coverage-clover" target="build/logs/clover.xml"/>
</logging>
</include>
</source>
<php>
<env name="APP_KEY" value="base64:yk+bUVuZa1p86Dqjk9OjVK2R1pm6XHxC6xEKFq8utH0="/>
</php>
Expand Down
5 changes: 5 additions & 0 deletions tests/AuthorizationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,11 @@ public function getAuthIdentifier()
return 'swagger-ui-test';
}

public function getAuthPasswordName()
{
return 'password';
}

public function getAuthPassword()
{
return 'secret';
Expand Down
2 changes: 1 addition & 1 deletion tests/OpenApiRouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ protected function getPackageProviders($app) : array
return [SwaggerUiServiceProvider::class];
}

public function openApiFileProvider() : array
public static function openApiFileProvider() : array
{
return [
'json file' => [__DIR__ . '/testfiles/openapi.json'],
Expand Down

0 comments on commit 87460ef

Please sign in to comment.