Skip to content

Commit

Permalink
Merge pull request #372 from tienvx/create-matchers-and-generators-cl…
Browse files Browse the repository at this point in the history
…asses

refactor: Use matcher and generator classes
  • Loading branch information
tienvx authored Dec 18, 2023
2 parents 7de08bd + c9f1c3d commit 8ecdfd7
Show file tree
Hide file tree
Showing 11 changed files with 342 additions and 1,098 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function testGetGenerators(): void
->setPath('/generators')
->addHeader('Accept', 'application/json')
->setBody([
'id' => $this->matcher->fromProviderState($this->matcher->integer(), '${id}')
'id' => $this->matcher->fromProviderState($this->matcher->integerV3(), '${id}')
]);

$response = new ProviderResponse();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"request": {
"body": {
"content": {
"id": 13
"id": null
},
"contentType": "application/json",
"encoded": false
Expand All @@ -41,7 +41,7 @@
"combine": "AND",
"matchers": [
{
"match": "type"
"match": "integer"
}
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace PhpPact\Consumer\Matcher\Exception;

class MatcherNotSupportedException extends MatcherException
{
}
Loading

0 comments on commit 8ecdfd7

Please sign in to comment.