• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Galbar / JsonPath-PHP / #17
99%

Build:
DEFAULT BRANCH: master
Ran 03 Mar 2023 05:41PM UTC
Jobs 1
Files 18
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
#17

push

Galbar
Breaking change: Change how the recursive operator works

I found a bug in how the recursive operator works (thanks to issue 64).
It was only using the latest selected result (not the whole array) to
apply the recursive search on.

Once this was fixed, two existing tests failed. Both using the same
JsonPath `$.store..*[?(@..model == null)].color` on the following JSON
document:

    { "store": {
        "book": [
          { "category": "reference",
            "author": "Nigel Rees",
            "title": "Sayings of the Century",
            "price": 8.95,
            "available": true
          },
          { "category": "fiction",
            "author": "Evelyn Waugh",
            "title": "Sword of Honour",
            "price": 12.99,
            "available": false
          },
          { "category": "fiction",
            "author": "Herman Melville",
            "title": "Moby Dick",
            "isbn": "0-553-21311-3",
            "price": 8.99,
            "available": true
          },
          { "category": "fiction",
            "author": "J. R. R. Tolkien",
            "title": "The Lord of the Rings",
            "isbn": "0-395-19395-8",
            "price": 22.99,
            "available": false
          }
        ],
        "bicycle": {
          "color": "red",
          "price": 19.95,
          "available": true,
          "model": null,
          "sku-number": "BCCLE-0001-RD"
        }
      },
      "authors": [
        "Nigel Rees",
        "Evelyn Waugh",
        "Herman Melville",
        "J. R. R. Tolkien"
      ],
      "Bike models": [
        1,
        2,
        3
      ]
    }

After a long analysis I have realized that the test was wrong. Let's
break that down:

1. `$` selects the whole json.

2. `.store` selects the value for the key "store":

    {
      "book": [
        { "category": "reference",
          "author": "Nigel Rees",
          "title": "Sayings of the Century",
          "price": 8.95,
          "availab... (continued)

19 of 19 new or added lines in 2 files covered. (100.0%)

403 of 406 relevant lines covered (99.26%)

42.53 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #17.1 03 Mar 2023 05:40PM UTC 18
99.26
Source Files on build #17
  • Tree
  • List 18
  • Changed 7
  • Source Changed 3
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 5ac1783e on github
  • Prev Build on master
  • Next Build on master
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc