Commit 7303e575 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

WIP migration vers unicaen/authentification

parent 725d4932
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -9,6 +9,8 @@
    ],
    "require": {
        "php": "^8.0",
        "unicaen/authentification": "dev-release_6.3.0",
        "unicaen/privilege": "^6.0",
        "laminas/laminas-test": "^4.2",
        "phpunit/phpunit": "^9.0",
        "phpspec/prophecy": "^1.6",
+5 −5
Original line number Diff line number Diff line
@@ -36,13 +36,13 @@ abstract class AbstractControllerTestCase extends \Laminas\Test\PHPUnit\Controll

    /**
     * @param string $authorizeServiceClass
     * @return ObjectProphecy|\UnicaenAuth\Service\AuthorizeService
     * @return ObjectProphecy|\UnicaenPrivilege\Service\AuthorizeService
     */
    protected function mockAuthorizeService(string $authorizeServiceClass)
    {
        $prophet = new Prophet();

        /** @var ObjectProphecy|\UnicaenAuth\Service\AuthorizeService $prophecy */
        /** @var ObjectProphecy|\UnicaenPrivilege\Service\AuthorizeService $prophecy */
        $prophecy = $prophet->prophesize();
        $prophecy->willExtend($authorizeServiceClass);

@@ -60,13 +60,13 @@ abstract class AbstractControllerTestCase extends \Laminas\Test\PHPUnit\Controll

    /**
     * @param string $userContextServiceClass
     * @return ObjectProphecy|\UnicaenAuth\Service\UserContext
     * @return ObjectProphecy|\UnicaenAuthentification\Service\UserContext
     */
    protected function mockUserContextService(string $userContextServiceClass)
    {
        $prophet = new Prophet();

        /** @var ObjectProphecy|\UnicaenAuth\Service\UserContext $prophecy */
        /** @var ObjectProphecy|\UnicaenAuthentification\Service\UserContext $prophecy */
        $prophecy = $prophet->prophesize();
        $prophecy->willExtend($userContextServiceClass);

@@ -78,7 +78,7 @@ abstract class AbstractControllerTestCase extends \Laminas\Test\PHPUnit\Controll
        /* @var $services ServiceManager */
        $services = $this->getApplication()->getServiceManager();
        $services->setAllowOverride(true);
        $services->setFactory('UnicaenAuth\Service\UserContext', function() use ($service) {
        $services->setFactory(\UnicaenAuthentification\Service\UserContext::class, function() use ($service) {
            return $service;
        });