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 a76d914
Show file tree
Hide file tree
Showing 11 changed files with 341 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,9 @@
<?php

namespace PhpPact\Consumer\Matcher\Exception;

use Exception;

class MatcherNotSupportedException extends Exception
{
}
Loading

0 comments on commit a76d914

Please sign in to comment.