Skip to content

Commit

Permalink
chore(deps): update dependency phpunit/phpunit to v10 (#54)
Browse files Browse the repository at this point in the history
* chore(deps): update dependency phpunit/phpunit to v10

* chore(phpunit): adapt config

* chore(phpunit): use attributes

* chore(deps): use phpunit v10.3

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Simon Podlipsky <simon@podlipsky.net>
  • Loading branch information
renovate[bot] and simPod authored Sep 4, 2023
1 parent b42622c commit 2c189f8
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 33 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"phpstan/phpstan": "^1.0.0",
"phpstan/phpstan-phpunit": "^1.0.0",
"phpstan/phpstan-strict-rules": "^1.0.0",
"phpunit/phpunit": "^9.5",
"phpunit/phpunit": "^10.3",
"psalm/plugin-phpunit": "0.18.4",
"psr-mock/http": "^1.0",
"thecodingmachine/phpstan-safe-rule": "^1.0",
Expand Down
23 changes: 12 additions & 11 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
beStrictAboutChangesToGlobalState="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
executionOrder="random"
colors="true"
bootstrap="tests/bootstrap.php"
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
beStrictAboutChangesToGlobalState="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
executionOrder="random"
colors="true"
bootstrap="tests/bootstrap.php"
>
<testsuites>
<testsuite name="Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage>
<source>
<include>
<directory suffix=".php">src</directory>
<directory>src</directory>
</include>
</coverage>
</source>
</phpunit>
14 changes: 3 additions & 11 deletions tests/Extractor/ResponseExtractorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,16 @@

namespace SimPod\JsonRpc\Extractor;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\TestCase;
use PsrMock\Psr17\RequestFactory;
use PsrMock\Psr17\StreamFactory;
use PsrMock\Psr18\Client;
use PsrMock\Psr7\Response;

/** @coversDefaultClass \SimPod\JsonRpc\Extractor\ResponseExtractor */
class ResponseExtractorTest extends TestCase
#[CoversClass(ResponseExtractor::class)]
final class ResponseExtractorTest extends TestCase
{
/**
* @covers Extractor::__construct
* @covers ::getResult
*/
public function testResponseResult(): void
{
$responseBody = <<<'EOD'
Expand Down Expand Up @@ -55,11 +52,6 @@ public function testResponseResult(): void
self::assertEquals('value', $result['key']);
}

/**
* @covers Extractor::__construct
* @covers ::getId
* @covers ::getVersion
*/
public function testResponse(): void
{
$responseBody = <<<'EOD'
Expand Down
13 changes: 3 additions & 10 deletions tests/HttpJsonRpcRequestFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,16 @@

namespace SimPod\JsonRpc;

use PHPUnit\Framework\Attributes\CoversClass;
use PHPUnit\Framework\TestCase;
use PsrMock\Psr17\RequestFactory;
use PsrMock\Psr17\StreamFactory;

use function Safe\preg_replace;

/** @coversDefaultClass \SimPod\JsonRpc\HttpJsonRpcRequestFactory */
class HttpJsonRpcRequestFactoryTest extends TestCase
#[CoversClass(HttpJsonRpcRequestFactory::class)]
final class HttpJsonRpcRequestFactoryTest extends TestCase
{
/**
* @covers ::request
* @covers ::createRequest
*/
public function testRequestBody(): void
{
$messageFactory = new RequestFactory();
Expand All @@ -43,10 +40,6 @@ public function testRequestBody(): void
);
}

/**
* @covers ::request
* @covers ::createRequest
*/
public function testRequestHeader(): void
{
$messageFactory = new RequestFactory();
Expand Down

0 comments on commit 2c189f8

Please sign in to comment.