diff options
| author | Eole <EoleDev@outlook.fr> | 2016-04-27 16:42:28 +0200 |
|---|---|---|
| committer | Eole <EoleDev@outlook.fr> | 2016-04-27 16:42:28 +0200 |
| commit | 49f416dc5061032e0514ea0cfeceaca37d13e432 (patch) | |
| tree | 1202ac2a6fa860b8929afdc886c94fc50bd0a1de /server/vendor/php-opencloud/common/tests/unit/Common/JsonPathTest.php | |
| parent | c7edd70b5e5b0f5159c78ce3d924d4e7f60db816 (diff) | |
| parent | c9202d9113210981ae47df40511645da2ee140df (diff) | |
Merge branch 'develop' into Eole_Graph
Conflicts:
client/index.html
client/js/controllers/home/home.js
client/partials/home/home.html
Diffstat (limited to 'server/vendor/php-opencloud/common/tests/unit/Common/JsonPathTest.php')
| -rw-r--r-- | server/vendor/php-opencloud/common/tests/unit/Common/JsonPathTest.php | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/server/vendor/php-opencloud/common/tests/unit/Common/JsonPathTest.php b/server/vendor/php-opencloud/common/tests/unit/Common/JsonPathTest.php deleted file mode 100644 index 1410076..0000000 --- a/server/vendor/php-opencloud/common/tests/unit/Common/JsonPathTest.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php - -namespace OpenCloud\Test\Common; - -use OpenCloud\Common\JsonPath; - -class JsonPathTest extends \PHPUnit_Framework_TestCase -{ - private $jsonPath; - - public function setUp() - { - $this->jsonPath = new JsonPath([]); - } - - public function test_it_sets_values_according_to_paths() - { - $this->jsonPath->set('foo.bar.baz', 'VALUE'); - - $expected = [ - 'foo' => [ - 'bar' => [ - 'baz' => 'VALUE', - ] - ] - ]; - - $this->assertEquals($expected, $this->jsonPath->getStructure()); - } - - public function test_it_sets_arrays_according_to_paths() - { - $jsonPath = new JsonPath([ - 'foo' => [ - 'bar' => [ - 'value' => 'VALUE', - ] - ] - ]); - - $jsonPath->set('foo.bar.items', ['item_1', 'item_2']); - - $expected = [ - 'foo' => [ - 'bar' => [ - 'value' => 'VALUE', - 'items' => ['item_1', 'item_2'], - ] - ] - ]; - - $this->assertEquals($expected, $jsonPath->getStructure()); - } - - public function test_it_gets_values_according_to_paths() - { - $jsonPath = new JsonPath([ - 'foo' => [ - 'bar' => [ - 'baz' => 'VALUE_1', - 'lol' => 'VALUE_2', - ] - ] - ]); - - $this->assertEquals('VALUE_1', $jsonPath->get('foo.bar.baz')); - $this->assertEquals('VALUE_2', $jsonPath->get('foo.bar.lol')); - $this->assertNull($jsonPath->get('foo.bar.boo')); - } -} |
