PHP Class Flow\JSONPath\Test\JSONPathTest

Inheritance: extends PHPUnit_Framework_TestCase
Afficher le fichier Open project: FlowCommunications/JSONPath

Méthodes publiques

Méthode Description
exampleData ( $asArray = true )
exampleDataExtra ( $asArray = true )
exampleDataLocations ( $asArray = true )
exampleDataWithSimpleIntegers ( $asArray = true )
exampleDataWithSlashes ( $asArray = true )
testChildOperators ( ) $.store.books[0].title
testChildOperatorsAlt ( ) $['store']['books'][0]['title']
testChildQuery ( ) $.store.books[(@.length-1)].title
testFilterSliceA ( ) $.array[start:end:step]
testFilterSliceB ( )
testFilterSliceC ( )
testFilterSliceD ( )
testFilterSliceE ( ) Everything except the last 2 items
testFilterSliceF ( ) The Last item
testFilteringOnNoneArrays ( )
testFirst ( )
testFirstKey ( )
testLast ( )
testLastKey ( )
testMagicMethods ( )
testMatchWithComplexSquareBrackets ( )
testOffsetUnset ( )
testQueryMatchEquals ( ) $.
testQueryMatchEqualsWithUnquotedInteger ( ) $.
testQueryMatchLessThan ( ) $.store.books[?(@.price < 10)].title Filter books that have a price less than 10
testQueryMatchNotEqualsTo ( ) $.
testQueryMatchWithRecursive ( )
testRecursiveChildSearch ( ) $.
testRecursiveChildSearchAlt ( ) $.store.
testRecursiveChildSearchWithChildIndex ( ) $.
testRecursiveChildSearchWithChildQuery ( ) $.
testRecursiveChildSearchWithSliceFilter ( ) $.
testRecursiveWithQueryMatch ( ) $.
testRecursiveWithWildcard ( ) $.
testSimpleArrayAccess ( ) Tests direct key access.
testSlashesInIndex ( )
testWildCard ( ) $.store.* all things in store the structure of the example data makes this test look weird
testWildcardAltNotation ( ) $.store.books[*].author

Method Details

exampleData() public méthode

public exampleData ( $asArray = true )

exampleDataExtra() public méthode

public exampleDataExtra ( $asArray = true )

exampleDataLocations() public méthode

public exampleDataLocations ( $asArray = true )

exampleDataWithSimpleIntegers() public méthode

public exampleDataWithSimpleIntegers ( $asArray = true )

exampleDataWithSlashes() public méthode

public exampleDataWithSlashes ( $asArray = true )

testChildOperators() public méthode

$.store.books[0].title
public testChildOperators ( )

testChildOperatorsAlt() public méthode

$['store']['books'][0]['title']

testChildQuery() public méthode

This notation is only partially implemented eg. hacked in
public testChildQuery ( )

testFilterSliceA() public méthode

$.array[start:end:step]
public testFilterSliceA ( )

testFilterSliceB() public méthode

public testFilterSliceB ( )

testFilterSliceC() public méthode

public testFilterSliceC ( )

testFilterSliceD() public méthode

public testFilterSliceD ( )

testFilterSliceE() public méthode

Everything except the last 2 items
public testFilterSliceE ( )

testFilterSliceF() public méthode

The Last item
public testFilterSliceF ( )

testFilteringOnNoneArrays() public méthode

testFirst() public méthode

public testFirst ( )

testFirstKey() public méthode

public testFirstKey ( )

testLast() public méthode

public testLast ( )

testLastKey() public méthode

public testLastKey ( )

testMagicMethods() public méthode

public testMagicMethods ( )

testMatchWithComplexSquareBrackets() public méthode

testOffsetUnset() public méthode

public testOffsetUnset ( )

testQueryMatchEquals() public méthode

.books[?(@.author == "J. R. R. Tolkien")] Filter books that have a title equal to "..."

testQueryMatchEqualsWithUnquotedInteger() public méthode

.books[?(@.author = 1)] Filter books that have a title equal to "..."

testQueryMatchLessThan() public méthode

$.store.books[?(@.price < 10)].title Filter books that have a price less than 10

testQueryMatchNotEqualsTo() public méthode

.books[?(@.author != "J. R. R. Tolkien")] Filter books that have a title not equal to "..."

testQueryMatchWithRecursive() public méthode

testRecursiveChildSearch() public méthode

.author

testRecursiveChildSearchAlt() public méthode

.price the price of everything in the store.

testRecursiveChildSearchWithChildIndex() public méthode

.books[2] the third book

testRecursiveChildSearchWithChildQuery() public méthode

.books[(@.length-1)]

testRecursiveChildSearchWithSliceFilter() public méthode

.books[-1:] Resturn the last results

testRecursiveWithQueryMatch() public méthode

.books[?(@.isbn)] filter all books with isbn number

testRecursiveWithWildcard() public méthode

.* All members of JSON structure

testSimpleArrayAccess() public méthode

Tests direct key access.

testSlashesInIndex() public méthode

public testSlashesInIndex ( )

testWildCard() public méthode

$.store.* all things in store the structure of the example data makes this test look weird
public testWildCard ( )

testWildcardAltNotation() public méthode

$.store.books[*].author