- Expose l'entite Permission via ApiResource (GetCollection + Get uniquement)
- Serialisation limitee au groupe permission:read (id, code, label, module, orphan)
- Securite temporaire is_granted('ROLE_ADMIN'), a remplacer par
is_granted('core.permissions.view') au ticket #345
- Filtres : SearchFilter exact sur module, BooleanFilter sur orphan
- Configure api_platform.mapping.paths pour que le compile pass AP decouvre
les ApiResource/ApiFilter declares dans src/Module/Core/Domain/Entity
- Ajoute symfony/browser-kit et symfony/http-client en dev pour les tests
fonctionnels API Platform, plus KERNEL_CLASS dans phpunit.dist.xml
- Tests fonctionnels PermissionApiTest : collection, get item, filtres
module et orphan, 405 sur POST, 401 non authentifie, 403 non-admin
46 lines
1.4 KiB
XML
46 lines
1.4 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
|
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
|
|
colors="true"
|
|
failOnDeprecation="true"
|
|
failOnNotice="true"
|
|
failOnWarning="true"
|
|
bootstrap="tests/bootstrap.php"
|
|
cacheDirectory=".phpunit.cache"
|
|
>
|
|
<php>
|
|
<ini name="display_errors" value="1" />
|
|
<ini name="error_reporting" value="-1" />
|
|
<server name="APP_ENV" value="test" force="true" />
|
|
<server name="SHELL_VERBOSITY" value="-1" />
|
|
<server name="KERNEL_CLASS" value="App\Kernel" />
|
|
</php>
|
|
|
|
<testsuites>
|
|
<testsuite name="Project Test Suite">
|
|
<directory>tests</directory>
|
|
</testsuite>
|
|
</testsuites>
|
|
|
|
<source ignoreSuppressionOfDeprecations="true"
|
|
ignoreIndirectDeprecations="true"
|
|
restrictNotices="true"
|
|
restrictWarnings="true"
|
|
>
|
|
<include>
|
|
<directory>src</directory>
|
|
</include>
|
|
|
|
<deprecationTrigger>
|
|
<method>Doctrine\Deprecations\Deprecation::trigger</method>
|
|
<method>Doctrine\Deprecations\Deprecation::delegateTriggerToBackend</method>
|
|
<function>trigger_deprecation</function>
|
|
</deprecationTrigger>
|
|
</source>
|
|
|
|
<extensions>
|
|
</extensions>
|
|
</phpunit>
|