Skip to content

Commit

Permalink
Adds new test for be sure that the 'minus' character is allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaime Lopez committed Aug 3, 2017
1 parent af429d1 commit da6a19b
Showing 1 changed file with 26 additions and 13 deletions.
39 changes: 26 additions & 13 deletions tests/Skyscanner/JsonPath/JsonObjectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ class JsonPathTest extends \PHPUnit_Framework_TestCase
"color": "red",
"price": 19.95,
"available": true,
"model": null
"model": null,
"sku-number": "BCCLE-0001-RD"
}
},
"authors": [
Expand Down Expand Up @@ -139,13 +140,18 @@ public function testGetProvider()
array(19.95),
"$.store.bicycle.price"
),
array(
array("BCCLE-0001-RD"),
"$.store.bicycle.sku-number"
),
array(
array(
array(
"color" => "red",
"price" => 19.95,
"available" => true,
"model" => null
"model" => null,
"sku-number" => "BCCLE-0001-RD"
)
),
"$.store.bicycle"
Expand Down Expand Up @@ -220,7 +226,8 @@ public function testGetProvider()
"red",
19.95,
true,
null
null,
"BCCLE-0001-RD"
),
"$.store.bicycle.*"
),
Expand Down Expand Up @@ -288,13 +295,13 @@ public function testGetProvider()
array(
"red"
),
"$..*[?(@.length <= 4)].color"
"$..*[?(@.length <= 5)].color"
),
array(
array(
"red"
),
"$..*[?(@.length <= 4.0)].color"
"$..*[?(@.length <= 5.0)].color"
),
array(
array(
Expand Down Expand Up @@ -360,7 +367,8 @@ public function testGetProvider()
"color" => "red",
"price" => 19.95,
"available" => true,
"model" => null
"model" => null,
"sku-number" => "BCCLE-0001-RD"
)
),
"$.store[?(@.*.length == 3)]",
Expand Down Expand Up @@ -417,7 +425,8 @@ public function testSmartGetProvider()
"color" => "red",
"price" => 19.95,
"available" => true,
"model" => null
"model" => null,
"sku-number" => "BCCLE-0001-RD"
),
"$.store.bicycle"
),
Expand Down Expand Up @@ -491,7 +500,8 @@ public function testSmartGetProvider()
"red",
19.95,
true,
null
null,
"BCCLE-0001-RD"
),
"$.store.bicycle.*"
),
Expand Down Expand Up @@ -559,13 +569,13 @@ public function testSmartGetProvider()
array(
"red"
),
"$..*[?(@.length <= 4)].color"
"$..*[?(@.length <= 5)].color"
),
array(
array(
"red"
),
"$..*[?(@.length <= 4.0)].color"
"$..*[?(@.length <= 5.0)].color"
),
array(
array(
Expand Down Expand Up @@ -631,7 +641,8 @@ public function testSmartGetProvider()
"color" => "red",
"price" => 19.95,
"available" => true,
"model" => null
"model" => null,
"sku-number" => "BCCLE-0001-RD"
)
),
"$.store[?(@.*.length == 3)]",
Expand Down Expand Up @@ -746,7 +757,8 @@ public function testAdd($smartGet)
'price' => 19.95,
'type' => 'BMX',
'available' => true,
'model' => null
'model' => null,
"sku-number" => "BCCLE-0001-RD"
)
);
$expected = $smartGet ? $expected[0] : $expected;
Expand Down Expand Up @@ -794,7 +806,8 @@ public function testRemove($smartGet)
],
"bicycle": {
"color": "red",
"model": null
"model": null,
"sku-number": "BCCLE-0001-RD"
}
},
"authors": [
Expand Down

0 comments on commit da6a19b

Please sign in to comment.