Skip to content

Commit

Permalink
Merge pull request #577 from tienvx/fix-copy-paste-issue
Browse files Browse the repository at this point in the history
chore: Fix copy paste issues in MinimalFormatterTest
  • Loading branch information
tienvx authored Apr 26, 2024
2 parents 1b88b78 + d917437 commit 1b662bf
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace PhpPactTest\Consumer\Matcher\Formatters;

use PhpPact\Consumer\Matcher\Formatters\MinimalFormatter;
use PhpPact\Consumer\Matcher\Generators\RandomString;
use PhpPact\Consumer\Matcher\Matchers\Date;
use PHPUnit\Framework\TestCase;

Expand All @@ -17,12 +16,11 @@ class MinimalFormatterTest extends TestCase
*/
public function testFormat(bool $hasGenerator, ?string $value): void
{
$matcher = new Date('yyyy-MM-dd', 5);
$generator = $hasGenerator ? new RandomString(10) : null;
$matcher = new Date('yyyy-MM-dd', $value);
$formatter = new MinimalFormatter();
$this->assertSame([
'pact:matcher:type' => 'date',
'format' => 'yyyy-MM-dd',
], $formatter->format($matcher, $generator, $value));
], $formatter->format($matcher));
}
}

0 comments on commit 1b662bf

Please sign in to comment.