Skip to content

Commit

Permalink
refactor: Use matcher and generator classes
Browse files Browse the repository at this point in the history
  • Loading branch information
tienvx committed Dec 18, 2023
1 parent 7de08bd commit 44dff56
Show file tree
Hide file tree
Showing 11 changed files with 339 additions and 1,095 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 44dff56

Please sign in to comment.