diff --git a/application/src/Controller/API/Meta/HeredityApiController.php b/application/src/Controller/API/Meta/HeredityApiController.php new file mode 100644 index 0000000..ae0c607 --- /dev/null +++ b/application/src/Controller/API/Meta/HeredityApiController.php @@ -0,0 +1,30 @@ + 'relation', - self::LAW => 'law', self::SOURCE => 'source', + self::LAW => 'law', + self::RIGHT => 'right', + self::MEMBER => 'member', + self::HEREDITY => 'heredity', ]; } diff --git a/application/tests/Unit/Domain/RightManagement/RightCheckerTest.php b/application/tests/Unit/Domain/RightManagement/RightCheckerTest.php index c0be286..1f13485 100644 --- a/application/tests/Unit/Domain/RightManagement/RightCheckerTest.php +++ b/application/tests/Unit/Domain/RightManagement/RightCheckerTest.php @@ -41,7 +41,7 @@ class RightCheckerTest extends TestCase public function setUp(): void { - $this->layer = LayerType::RELATION; + $this->layer = LayerType::MEMBER; $this->type = CRUDType::READ; $this->source = new PureSource(); $this->right = new Right(); diff --git a/application/tests/Unit/Entity/Attribut/LayerAttributTest.php b/application/tests/Unit/Entity/Attribut/LayerAttributTest.php index 13affff..8c022b5 100644 --- a/application/tests/Unit/Entity/Attribut/LayerAttributTest.php +++ b/application/tests/Unit/Entity/Attribut/LayerAttributTest.php @@ -29,11 +29,7 @@ class LayerAttributTest extends TestCase public function testAccessors(): void { - foreach ([ - LayerType::LAW, - LayerType::RELATION, - LayerType::SOURCE, - ] as $value) { + foreach (LayerType::getChoices() as $value) { $this->assertNull($this->layer->setLayer($value)); $this->assertEquals($value, $this->layer->getLayer()); }