This repository was archived by the owner on Oct 25, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +8
-10
lines changed Expand file tree Collapse file tree 4 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ test: unit ## (PHP) Launch all test tools
19
19
20
20
unit : vendor/bin # # (PHP) Unit tests
21
21
@echo
22
- vendor/bin/phpunit
22
+ vendor/bin/phpunit tests/
23
23
24
24
vendor/bin : # # (PHP) Install dependencies
25
25
@echo
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " wizaplace/json-decoder" ,
3
- "description" : " Enable to automatically throw an exception when json_decode() fails to decode a JSON" ,
3
+ "description" : " Throw an exception when json_decode() fails to decode a JSON" ,
4
4
"type" : " library" ,
5
5
"homepage" : " https://github.com/wizaplace/json-decoder" ,
6
6
"require-dev" : {
25
25
"Wizaplace\\ Json\\ " : " src/"
26
26
}
27
27
},
28
- "autoload-dev" : {
28
+ "autoload-dev" : {
29
29
"psr-4" : {
30
30
"Wizaplace\\ Test\\ " : " tests/"
31
31
}
Original file line number Diff line number Diff line change 7
7
8
8
declare (strict_types=1 );
9
9
10
- namespace Wizaplace \Test \ Decoder ;
10
+ namespace Wizaplace \Test ;
11
11
12
12
use Symfony \Component \OptionsResolver \OptionsResolver ;
13
13
use Wizaplace \Json \Decoder \AbstractJsonDecoder ;
Original file line number Diff line number Diff line change 7
7
8
8
declare (strict_types=1 );
9
9
10
- namespace Wizaplace \Test \ Decoder ;
10
+ namespace Wizaplace \Test ;
11
11
12
12
use PHPUnit \Framework \TestCase ;
13
- use Wizaplace \Json \Exception \JsonDecodeException ;
14
13
15
14
class JsonDecoderTest extends TestCase
16
15
{
@@ -22,9 +21,9 @@ public function testDefaultConfiguration(): void
22
21
);
23
22
}
24
23
25
- /** @expectedException \Wizaplace\Json\Exception\JsonDecodeException */
26
24
public function testDepth (): void
27
25
{
26
+ $ this ->expectException (\Wizaplace \Json \Exception \JsonDecodeException::class);
28
27
static ::assertEquals (
29
28
$ this ->getExpectedArray (),
30
29
(new JsonDecoder ())
@@ -33,9 +32,9 @@ public function testDepth(): void
33
32
);
34
33
}
35
34
36
- /** @expectedException \Wizaplace\Json\Exception\JsonDecodeException */
37
35
public function testSyntaxError (): void
38
36
{
37
+ $ this ->expectException (\Wizaplace \Json \Exception \JsonDecodeException::class);
39
38
(new JsonDecoder ())->decode ('{ ' );
40
39
}
41
40
@@ -47,16 +46,15 @@ public function testAllowNull(): void
47
46
);
48
47
}
49
48
50
- /** @expectedException \Wizaplace\Json\Exception\JsonDecodeNullException */
51
49
public function testDisallowNull (): void
52
50
{
51
+ $ this ->expectException (\Wizaplace \Json \Exception \JsonDecodeNullException::class);
53
52
static ::assertEquals (
54
53
null ,
55
54
(new JsonDecoder ())
56
55
->setAllowNull (false )
57
56
->decode ('null ' )
58
57
);
59
- $ this ->expectException ("\Wizaplace\Json\Exception\JsonDecodeNullException " );
60
58
}
61
59
62
60
protected function createJson (): string
You can’t perform that action at this time.
0 commit comments