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
1919
2020unit : vendor/bin # # (PHP) Unit tests
2121 @echo
22- vendor/bin/phpunit
22+ vendor/bin/phpunit tests/
2323
2424vendor/bin : # # (PHP) Install dependencies
2525 @echo
Original file line number Diff line number Diff line change 11{
22 "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" ,
44 "type" : " library" ,
55 "homepage" : " https://github.com/wizaplace/json-decoder" ,
66 "require-dev" : {
2525 "Wizaplace\\ Json\\ " : " src/"
2626 }
2727 },
28- "autoload-dev" : {
28+ "autoload-dev" : {
2929 "psr-4" : {
3030 "Wizaplace\\ Test\\ " : " tests/"
3131 }
Original file line number Diff line number Diff line change 77
88declare (strict_types=1 );
99
10- namespace Wizaplace \Test \ Decoder ;
10+ namespace Wizaplace \Test ;
1111
1212use Symfony \Component \OptionsResolver \OptionsResolver ;
1313use Wizaplace \Json \Decoder \AbstractJsonDecoder ;
Original file line number Diff line number Diff line change 77
88declare (strict_types=1 );
99
10- namespace Wizaplace \Test \ Decoder ;
10+ namespace Wizaplace \Test ;
1111
1212use PHPUnit \Framework \TestCase ;
13- use Wizaplace \Json \Exception \JsonDecodeException ;
1413
1514class JsonDecoderTest extends TestCase
1615{
@@ -22,9 +21,9 @@ public function testDefaultConfiguration(): void
2221 );
2322 }
2423
25- /** @expectedException \Wizaplace\Json\Exception\JsonDecodeException */
2624 public function testDepth (): void
2725 {
26+ $ this ->expectException (\Wizaplace \Json \Exception \JsonDecodeException::class);
2827 static ::assertEquals (
2928 $ this ->getExpectedArray (),
3029 (new JsonDecoder ())
@@ -33,9 +32,9 @@ public function testDepth(): void
3332 );
3433 }
3534
36- /** @expectedException \Wizaplace\Json\Exception\JsonDecodeException */
3735 public function testSyntaxError (): void
3836 {
37+ $ this ->expectException (\Wizaplace \Json \Exception \JsonDecodeException::class);
3938 (new JsonDecoder ())->decode ('{ ' );
4039 }
4140
@@ -47,16 +46,15 @@ public function testAllowNull(): void
4746 );
4847 }
4948
50- /** @expectedException \Wizaplace\Json\Exception\JsonDecodeNullException */
5149 public function testDisallowNull (): void
5250 {
51+ $ this ->expectException (\Wizaplace \Json \Exception \JsonDecodeNullException::class);
5352 static ::assertEquals (
5453 null ,
5554 (new JsonDecoder ())
5655 ->setAllowNull (false )
5756 ->decode ('null ' )
5857 );
59- $ this ->expectException ("\Wizaplace\Json\Exception\JsonDecodeNullException " );
6058 }
6159
6260 protected function createJson (): string
You can’t perform that action at this time.
0 commit comments