Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions .codeclimate.yml

This file was deleted.

47 changes: 47 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
name: Unit tests
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, I'd add the same comments as in #38 -- maybe put this on the back burner, until #38 is resolved?


on:
push:
paths:
- '**.php'
- 'composer.json'
branches:
- 'v2'
pull_request:
paths:
- '**.php'
- 'composer.json'
branches:
- 'v2'
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ '7.0', '7.1' ]
name: PHP ${{ matrix.php }}

steps:
- name: Git checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: json

- name: Validate composer.json
run: composer validate

- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Install dependencies
run: composer update --prefer-dist --no-progress

- name: Run unit tests
run: ./vendor/bin/phpunit
16 changes: 0 additions & 16 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
],
"require": {
"php": ">=7.0",
"flow/jsonpath": "^0.4.0",
"softcreatr/jsonpath": "^0.5 || ^0.7",
"justinrainbow/json-schema": "^5.0"
},
"conflict": {
Expand Down
2 changes: 1 addition & 1 deletion src/Constraint/JsonValueMatches.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ protected function matches($other): bool

foreach ($result as $v) {
if ($v instanceof JSONPath) {
$v = $v->data();
$v = $v->getData();
}

$singleMatchResult = $this->constraint->evaluate($v, '', true);
Expand Down