File tree Expand file tree Collapse file tree 5 files changed +24
-10
lines changed Expand file tree Collapse file tree 5 files changed +24
-10
lines changed Original file line number Diff line number Diff line change 2424 "ext-mbstring" : " *"
2525 },
2626 "require-dev" : {
27- "phpunit/phpunit" : " ^4.8.36" ,
27+ "phpunit/phpunit" : " ^4.8.36|^7.3 " ,
2828 "mikehaertl/php-shellcommand" : " ^1.2.5" ,
2929 "squizlabs/php_codesniffer" : " ^2.3" ,
30- "symfony/finder" : " ^2.3 "
30+ "symfony/finder" : " ^2.8|^3.4|^4.1 "
3131 },
3232 "autoload" : {
3333 "psr-4" : {
Original file line number Diff line number Diff line change 2222 <logging >
2323 <log type =" tap" target =" build/report.tap" />
2424 <log type =" junit" target =" build/report.junit.xml" />
25- <log type =" coverage-html" target =" build/coverage" charset = " UTF-8 " yui = " true " highlight = " true " />
25+ <log type =" coverage-html" target =" build/coverage" />
2626 <log type =" coverage-text" target =" build/coverage.txt" />
2727 <log type =" coverage-clover" target =" build/logs/clover.xml" />
2828 </logging >
Original file line number Diff line number Diff line change 1616
1717class MaximumDepthTest extends TestCase
1818{
19+ /**
20+ * @expectedException \ColinODell\Json5\SyntaxError
21+ * @expectedExceptionMessage Maximum stack depth exceeded
22+ */
1923 public function testMaximumDepthWithArray ()
2024 {
21- $ this ->setExpectedException ('ColinODell \\Json5 \\SyntaxError ' , 'Maximum stack depth exceeded ' );
2225 Json5Decoder::decode ('[[1]] ' , false , 2 );
2326 }
2427
28+ /**
29+ * @expectedException \ColinODell\Json5\SyntaxError
30+ * @expectedExceptionMessage Maximum stack depth exceeded
31+ */
2532 public function testMaximumDepthWithObject ()
2633 {
27- $ this ->setExpectedException ('ColinODell \\Json5 \\SyntaxError ' , 'Maximum stack depth exceeded ' );
2834 Json5Decoder::decode ('{"foo": {"bar": "baz"}} ' , false , 2 );
2935 }
3036
Original file line number Diff line number Diff line change @@ -89,10 +89,10 @@ public function dataForTestJson5Parsing()
8989 * @param string $json
9090 *
9191 * @dataProvider dataForTestValidES5DisallowedByJson5
92+ * @expectedException \ColinODell\Json5\SyntaxError
9293 */
9394 public function testValidES5DisallowedByJson5 ($ json )
9495 {
95- $ this ->setExpectedException ('ColinODell \\Json5 \\SyntaxError ' );
9696 Json5Decoder::decode ($ json );
9797 }
9898
@@ -160,15 +160,19 @@ public function testNaNWithSign()
160160 $ this ->assertTrue (is_nan (Json5Decoder::decode ('+NaN ' )));
161161 }
162162
163+ /**
164+ * @expectedException \ColinODell\Json5\SyntaxError
165+ */
163166 public function testBadNumberStartingWithN ()
164167 {
165- $ this ->setExpectedException ('ColinODell \\Json5 \\SyntaxError ' );
166168 Json5Decoder::decode ('NotANumber ' );
167169 }
168170
171+ /**
172+ * @expectedException \ColinODell\Json5\SyntaxError
173+ */
169174 public function testBadNumberStartingWithI ()
170175 {
171- $ this ->setExpectedException ('ColinODell \\Json5 \\SyntaxError ' );
172176 Json5Decoder::decode ('+Indigo ' );
173177 }
174178
Original file line number Diff line number Diff line change @@ -22,16 +22,20 @@ public function testArrayWithFirstElement0()
2222 $ this ->assertSame (array (0 ), json5_decode ($ json ));
2323 }
2424
25+ /**
26+ * @expectedException \ColinODell\Json5\SyntaxError
27+ */
2528 public function testOpenCurlyBraceOnly ()
2629 {
27- $ this ->setExpectedException ('ColinODell \\Json5 \\SyntaxError ' );
2830 json5_decode ('{ ' );
2931 $ this ->fail ('Should have thrown a syntax error ' );
3032 }
3133
34+ /**
35+ * @expectedException \ColinODell\Json5\SyntaxError
36+ */
3237 public function testOpenSquareBraceOnly ()
3338 {
34- $ this ->setExpectedException ('ColinODell \\Json5 \\SyntaxError ' );
3539 json5_decode ('[ ' );
3640 $ this ->fail ('Should have thrown a syntax error ' );
3741 }
You can’t perform that action at this time.
0 commit comments