Skip to content

Commit

Permalink
Release/3.0.3 - (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
gustavofreze committed Feb 12, 2024
1 parent 827a8c3 commit bd8983b
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 19 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Use PHP 8.2
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'

- name: Install dependencies
run: composer update --no-progress --optimize-autoloader

Expand All @@ -33,6 +38,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Use PHP 8.2
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'

- name: Install dependencies
run: composer update --no-progress --optimize-autoloader

Expand Down
9 changes: 5 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.idea
vendor
report
composer.lock
.phpunit.result.cache

/vendor/
/report
*.lock
.phpunit.*
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,14 @@
},
"require": {
"php": "^8.2",
"tiny-blocks/serializer": "^2.0",
"tiny-blocks/serializer": "^3.0",
"psr/http-message": "^1.1",
"ext-mbstring": "*"
},
"require-dev": {
"infection/infection": "^0.27",
"phpmd/phpmd": "^2.15",
"phpunit/phpunit": "^9.6",
"phpunit/phpunit": "^10",
"squizlabs/php_codesniffer": "^3.8"
},
"suggest": {
Expand Down
30 changes: 20 additions & 10 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,25 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="vendor/autoload.php"
cacheResultFile="report/.phpunit.result.cache"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
colors="true" processIsolation="false"
stopOnFailure="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false">

<coverage>
<report>
<clover outputFile="report/coverage-clover.xml"/>
<html outputDirectory="report/html/"/>
<text outputFile="report/coverage.txt"/>
</report>
</coverage>

<testsuites>
<testsuite name="default">
<directory suffix="Test.php">tests</directory>
</testsuite>
</testsuites>

<coverage>
<logging>
<junit outputFile="report/execution-result.xml"/>
</logging>

<source>
<include>
<directory suffix=".php">src</directory>
</include>
</coverage>
</source>

</phpunit>
4 changes: 2 additions & 2 deletions tests/HttpCodeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function testIsHttpCode(int $httpCode, bool $expected): void
self::assertEquals($expected, $actual);
}

public function providerForTestMessage(): array
public static function providerForTestMessage(): array
{
return [
[
Expand Down Expand Up @@ -64,7 +64,7 @@ public function providerForTestMessage(): array
];
}

public function providerForTestIsHttpCode(): array
public static function providerForTestIsHttpCode(): array
{
return [
[
Expand Down
2 changes: 1 addition & 1 deletion tests/HttpResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function testResponseInternalServerError(mixed $data, mixed $expected): v
self::assertEquals($this->defaultHeaderFrom(code: HttpCode::INTERNAL_SERVER_ERROR), $response->getHeaders());
}

public function providerData(): array
public static function providerData(): array
{
return [
[
Expand Down

0 comments on commit bd8983b

Please sign in to comment.