Skip to content

Commit 1cbf3e8

Browse files
committed
Expand dev constraint versions
1 parent 66f6f00 commit 1cbf3e8

File tree

5 files changed

+24
-10
lines changed

5 files changed

+24
-10
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
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": {

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
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>

test/Functional/MaximumDepthTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,21 @@
1616

1717
class 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

test/Functional/ParseTest.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff 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

test/Functional/RegressionTest.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)