| @@ 40-49 (lines=10) @@ | ||
| 37 | $this->matches(['unknown_field' => 'some-value'])->shouldReturn(false); |
|
| 38 | } |
|
| 39 | ||
| 40 | function it_does_match_if_all_criteria_fields_match(FieldNode $f1, FieldNode $f2) |
|
| 41 | { |
|
| 42 | $f1->matches('search-value1')->willReturn(true); |
|
| 43 | $f2->matches('search-value2')->willReturn(true); |
|
| 44 | ||
| 45 | $this->matches([ |
|
| 46 | 'field1' => 'search-value1', |
|
| 47 | 'field2' => 'search-value2', |
|
| 48 | ])->shouldReturn(true); |
|
| 49 | } |
|
| 50 | ||
| 51 | function it_does_not_match_if_any_criteria_fields_fail_to_match(FieldNode $f1, FieldNode $f2) |
|
| 52 | { |
|
| @@ 51-60 (lines=10) @@ | ||
| 48 | ])->shouldReturn(true); |
|
| 49 | } |
|
| 50 | ||
| 51 | function it_does_not_match_if_any_criteria_fields_fail_to_match(FieldNode $f1, FieldNode $f2) |
|
| 52 | { |
|
| 53 | $f1->matches('search-value1')->willReturn(true); |
|
| 54 | $f2->matches('search-value2')->willReturn(false); |
|
| 55 | ||
| 56 | $this->matches([ |
|
| 57 | 'field1' => 'search-value1', |
|
| 58 | 'field2' => 'search-value2', |
|
| 59 | ])->shouldReturn(false); |
|
| 60 | } |
|
| 61 | } |
|
| 62 | ||
| @@ 81-90 (lines=10) @@ | ||
| 78 | $this->matches(['unknown_field' => 'some-value'])->shouldReturn(false); |
|
| 79 | } |
|
| 80 | ||
| 81 | function it_does_match_if_all_criteria_fields_match(FieldNode $f1, FieldNode $f2) |
|
| 82 | { |
|
| 83 | $f1->matches('search-value1')->willReturn(true); |
|
| 84 | $f2->matches('search-value2')->willReturn(true); |
|
| 85 | ||
| 86 | $this->matches([ |
|
| 87 | 'field1' => 'search-value1', |
|
| 88 | 'field2' => 'search-value2', |
|
| 89 | ])->shouldReturn(true); |
|
| 90 | } |
|
| 91 | ||
| 92 | function it_does_not_match_if_any_criteria_fields_fail_to_match(FieldNode $f1, FieldNode $f2) |
|
| 93 | { |
|
| @@ 92-101 (lines=10) @@ | ||
| 89 | ])->shouldReturn(true); |
|
| 90 | } |
|
| 91 | ||
| 92 | function it_does_not_match_if_any_criteria_fields_fail_to_match(FieldNode $f1, FieldNode $f2) |
|
| 93 | { |
|
| 94 | $f1->matches('search-value1')->willReturn(true); |
|
| 95 | $f2->matches('search-value2')->willReturn(false); |
|
| 96 | ||
| 97 | $this->matches([ |
|
| 98 | 'field1' => 'search-value1', |
|
| 99 | 'field2' => 'search-value2', |
|
| 100 | ])->shouldReturn(false); |
|
| 101 | } |
|
| 102 | ||
| 103 | function it_does_not_match_unknown_resource() |
|
| 104 | { |
|