feat: add CurrencyValidator
fix: add CurrencyValidator CurrencyValidator zarad
This commit is contained in:
19
tests/Validator/ValidatorTestCase.php
Normal file
19
tests/Validator/ValidatorTestCase.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Tests\Validator;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||
|
||||
abstract class ValidatorTestCase extends TestCase
|
||||
{
|
||||
protected function createExecutionContext(bool $violation): ExecutionContextInterface {
|
||||
$expected = $violation ? $this->once() : $this->never();
|
||||
|
||||
$context = $this->createMock(ExecutionContextInterface::class);
|
||||
$context->expects($expected)
|
||||
->method('buildViolation');
|
||||
|
||||
return $context;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user