Configurable activity and project number (#4729)
* added configurable activity number * added configurable project number * fix deprecations * added some tests for entity exporter * better configuration of dropdown pattern for customer, project and activity
This commit is contained in:
@@ -9,7 +9,10 @@
|
||||
|
||||
namespace App\Tests\Validator\Constraints;
|
||||
|
||||
use App\Configuration\ConfigLoaderInterface;
|
||||
use App\Entity\Project;
|
||||
use App\Repository\ProjectRepository;
|
||||
use App\Tests\Mocks\SystemConfigurationFactory;
|
||||
use App\Validator\Constraints\Project as ProjectConstraint;
|
||||
use App\Validator\Constraints\ProjectValidator;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
@@ -25,7 +28,11 @@ class ProjectValidatorTest extends ConstraintValidatorTestCase
|
||||
{
|
||||
protected function createValidator(): ProjectValidator
|
||||
{
|
||||
return new ProjectValidator();
|
||||
$loader = $this->createMock(ConfigLoaderInterface::class);
|
||||
$config = SystemConfigurationFactory::create($loader, []);
|
||||
$repository = $this->createMock(ProjectRepository::class);
|
||||
|
||||
return new ProjectValidator($config, $repository);
|
||||
}
|
||||
|
||||
public function testConstraintIsInvalid(): void
|
||||
|
||||
Reference in New Issue
Block a user