mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-18 08:09:34 +00:00
PartCustomState: Anpassungen bzgl. Tests
This commit is contained in:
parent
f7e47276f2
commit
be77e3a0ab
3 changed files with 5 additions and 1 deletions
|
|
@ -24,6 +24,7 @@ namespace App\DataFixtures;
|
||||||
|
|
||||||
use App\Entity\Attachments\AttachmentType;
|
use App\Entity\Attachments\AttachmentType;
|
||||||
use App\Entity\Base\AbstractStructuralDBElement;
|
use App\Entity\Base\AbstractStructuralDBElement;
|
||||||
|
use App\Entity\Parts\PartCustomState;
|
||||||
use App\Entity\ProjectSystem\Project;
|
use App\Entity\ProjectSystem\Project;
|
||||||
use App\Entity\Parts\Category;
|
use App\Entity\Parts\Category;
|
||||||
use App\Entity\Parts\Footprint;
|
use App\Entity\Parts\Footprint;
|
||||||
|
|
@ -50,7 +51,7 @@ class DataStructureFixtures extends Fixture implements DependentFixtureInterface
|
||||||
{
|
{
|
||||||
//Reset autoincrement
|
//Reset autoincrement
|
||||||
$types = [AttachmentType::class, Project::class, Category::class, Footprint::class, Manufacturer::class,
|
$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) {
|
foreach ($types as $type) {
|
||||||
$this->createNodesForClass($type, $manager);
|
$this->createNodesForClass($type, $manager);
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,7 @@ class PermissionPresetsHelper
|
||||||
$this->permissionResolver->setAllOperationsOfPermissionExcept($permHolder, 'attachment_types', PermissionData::ALLOW, ['import']);
|
$this->permissionResolver->setAllOperationsOfPermissionExcept($permHolder, 'attachment_types', PermissionData::ALLOW, ['import']);
|
||||||
$this->permissionResolver->setAllOperationsOfPermissionExcept($permHolder, 'currencies', PermissionData::ALLOW, ['import']);
|
$this->permissionResolver->setAllOperationsOfPermissionExcept($permHolder, 'currencies', PermissionData::ALLOW, ['import']);
|
||||||
$this->permissionResolver->setAllOperationsOfPermissionExcept($permHolder, 'measurement_units', 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, 'suppliers', PermissionData::ALLOW, ['import']);
|
||||||
$this->permissionResolver->setAllOperationsOfPermissionExcept($permHolder, 'projects', PermissionData::ALLOW, ['import']);
|
$this->permissionResolver->setAllOperationsOfPermissionExcept($permHolder, 'projects', PermissionData::ALLOW, ['import']);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@ declare(strict_types=1);
|
||||||
namespace App\Tests\Twig;
|
namespace App\Tests\Twig;
|
||||||
|
|
||||||
use App\Entity\Attachments\PartAttachment;
|
use App\Entity\Attachments\PartAttachment;
|
||||||
|
use App\Entity\Parts\PartCustomState;
|
||||||
use App\Entity\ProjectSystem\Project;
|
use App\Entity\ProjectSystem\Project;
|
||||||
use App\Entity\LabelSystem\LabelProfile;
|
use App\Entity\LabelSystem\LabelProfile;
|
||||||
use App\Entity\Parts\Category;
|
use App\Entity\Parts\Category;
|
||||||
|
|
@ -67,6 +68,7 @@ class EntityExtensionTest extends WebTestCase
|
||||||
$this->assertSame('currency', $this->service->getEntityType(new Currency()));
|
$this->assertSame('currency', $this->service->getEntityType(new Currency()));
|
||||||
$this->assertSame('measurement_unit', $this->service->getEntityType(new MeasurementUnit()));
|
$this->assertSame('measurement_unit', $this->service->getEntityType(new MeasurementUnit()));
|
||||||
$this->assertSame('label_profile', $this->service->getEntityType(new LabelProfile()));
|
$this->assertSame('label_profile', $this->service->getEntityType(new LabelProfile()));
|
||||||
|
$this->assertSame('part_custom_state', $this->service->getEntityType(new PartCustomState()));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue