File tree 4 files changed +19
-33
lines changed
4 files changed +19
-33
lines changed Original file line number Diff line number Diff line change 29
29
"phpstan/phpstan" : " ^1.0.0" ,
30
30
"phpstan/phpstan-phpunit" : " ^1.0.0" ,
31
31
"phpstan/phpstan-strict-rules" : " ^1.0.0" ,
32
- "phpunit/phpunit" : " ^9.5 " ,
32
+ "phpunit/phpunit" : " ^10.3 " ,
33
33
"psalm/plugin-phpunit" : " 0.18.4" ,
34
34
"psr-mock/http" : " ^1.0" ,
35
35
"thecodingmachine/phpstan-safe-rule" : " ^1.0" ,
Original file line number Diff line number Diff line change 1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
- <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
3
- xsi : noNamespaceSchemaLocation =" vendor/phpunit/phpunit/phpunit.xsd"
4
- beStrictAboutChangesToGlobalState =" true"
5
- beStrictAboutOutputDuringTests =" true"
6
- beStrictAboutTodoAnnotatedTests =" true"
7
- executionOrder =" random"
8
- colors =" true"
9
- bootstrap =" tests/bootstrap.php"
2
+ <phpunit
3
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
+ xsi : noNamespaceSchemaLocation =" vendor/phpunit/phpunit/phpunit.xsd"
5
+ beStrictAboutChangesToGlobalState =" true"
6
+ beStrictAboutOutputDuringTests =" true"
7
+ beStrictAboutTodoAnnotatedTests =" true"
8
+ executionOrder =" random"
9
+ colors =" true"
10
+ bootstrap =" tests/bootstrap.php"
10
11
>
11
12
<testsuites >
12
13
<testsuite name =" Test Suite" >
13
14
<directory >tests</directory >
14
15
</testsuite >
15
16
</testsuites >
16
- <coverage >
17
+ <source >
17
18
<include >
18
- <directory suffix = " .php " >src</directory >
19
+ <directory >src</directory >
19
20
</include >
20
- </coverage >
21
+ </source >
21
22
</phpunit >
Original file line number Diff line number Diff line change 4
4
5
5
namespace SimPod \JsonRpc \Extractor ;
6
6
7
+ use PHPUnit \Framework \Attributes \CoversClass ;
7
8
use PHPUnit \Framework \TestCase ;
8
9
use PsrMock \Psr17 \RequestFactory ;
9
10
use PsrMock \Psr17 \StreamFactory ;
10
11
use PsrMock \Psr18 \Client ;
11
12
use PsrMock \Psr7 \Response ;
12
13
13
- /** @coversDefaultClass \SimPod\JsonRpc\Extractor\ ResponseExtractor */
14
- class ResponseExtractorTest extends TestCase
14
+ #[CoversClass( ResponseExtractor::class)]
15
+ final class ResponseExtractorTest extends TestCase
15
16
{
16
- /**
17
- * @covers Extractor::__construct
18
- * @covers ::getResult
19
- */
20
17
public function testResponseResult (): void
21
18
{
22
19
$ responseBody = <<<'EOD'
@@ -55,11 +52,6 @@ public function testResponseResult(): void
55
52
self ::assertEquals ('value ' , $ result ['key ' ]);
56
53
}
57
54
58
- /**
59
- * @covers Extractor::__construct
60
- * @covers ::getId
61
- * @covers ::getVersion
62
- */
63
55
public function testResponse (): void
64
56
{
65
57
$ responseBody = <<<'EOD'
Original file line number Diff line number Diff line change 4
4
5
5
namespace SimPod \JsonRpc ;
6
6
7
+ use PHPUnit \Framework \Attributes \CoversClass ;
7
8
use PHPUnit \Framework \TestCase ;
8
9
use PsrMock \Psr17 \RequestFactory ;
9
10
use PsrMock \Psr17 \StreamFactory ;
10
11
11
12
use function Safe \preg_replace ;
12
13
13
- /** @coversDefaultClass \SimPod\JsonRpc\ HttpJsonRpcRequestFactory */
14
- class HttpJsonRpcRequestFactoryTest extends TestCase
14
+ #[CoversClass( HttpJsonRpcRequestFactory::class)]
15
+ final class HttpJsonRpcRequestFactoryTest extends TestCase
15
16
{
16
- /**
17
- * @covers ::request
18
- * @covers ::createRequest
19
- */
20
17
public function testRequestBody (): void
21
18
{
22
19
$ messageFactory = new RequestFactory ();
@@ -43,10 +40,6 @@ public function testRequestBody(): void
43
40
);
44
41
}
45
42
46
- /**
47
- * @covers ::request
48
- * @covers ::createRequest
49
- */
50
43
public function testRequestHeader (): void
51
44
{
52
45
$ messageFactory = new RequestFactory ();
You can’t perform that action at this time.
0 commit comments