PartCustomState: Anpassungen bzgl. Tests

This commit is contained in:
Marcel Diegelmann 2025-10-14 13:58:46 +02:00
parent f7e47276f2
commit be77e3a0ab
3 changed files with 5 additions and 1 deletions

View file

@ -24,6 +24,7 @@ namespace App\DataFixtures;
use App\Entity\Attachments\AttachmentType;
use App\Entity\Base\AbstractStructuralDBElement;
use App\Entity\Parts\PartCustomState;
use App\Entity\ProjectSystem\Project;
use App\Entity\Parts\Category;
use App\Entity\Parts\Footprint;
@ -50,7 +51,7 @@ class DataStructureFixtures extends Fixture implements DependentFixtureInterface
{
//Reset autoincrement
$types = [AttachmentType::class, Project::class, Category::class, Footprint::class, Manufacturer::class,
MeasurementUnit::class, StorageLocation::class, Supplier::class,];
MeasurementUnit::class, StorageLocation::class, Supplier::class, PartCustomState::class];
foreach ($types as $type) {
$this->createNodesForClass($type, $manager);

View file

@ -132,6 +132,7 @@ class PermissionPresetsHelper
$this->permissionResolver->setAllOperationsOfPermissionExcept($permHolder, 'attachment_types', PermissionData::ALLOW, ['import']);
$this->permissionResolver->setAllOperationsOfPermissionExcept($permHolder, 'currencies', PermissionData::ALLOW, ['import']);
$this->permissionResolver->setAllOperationsOfPermissionExcept($permHolder, 'measurement_units', PermissionData::ALLOW, ['import']);
$this->permissionResolver->setAllOperationsOfPermissionExcept($permHolder, 'part_custom_states', PermissionData::ALLOW, ['import']);
$this->permissionResolver->setAllOperationsOfPermissionExcept($permHolder, 'suppliers', PermissionData::ALLOW, ['import']);
$this->permissionResolver->setAllOperationsOfPermissionExcept($permHolder, 'projects', PermissionData::ALLOW, ['import']);

View file

@ -23,6 +23,7 @@ declare(strict_types=1);
namespace App\Tests\Twig;
use App\Entity\Attachments\PartAttachment;
use App\Entity\Parts\PartCustomState;
use App\Entity\ProjectSystem\Project;
use App\Entity\LabelSystem\LabelProfile;
use App\Entity\Parts\Category;
@ -67,6 +68,7 @@ class EntityExtensionTest extends WebTestCase
$this->assertSame('currency', $this->service->getEntityType(new Currency()));
$this->assertSame('measurement_unit', $this->service->getEntityType(new MeasurementUnit()));
$this->assertSame('label_profile', $this->service->getEntityType(new LabelProfile()));
$this->assertSame('part_custom_state', $this->service->getEntityType(new PartCustomState()));
}
}