Commit 806db90d authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Migration vers laminas

parent d507f84b
Pipeline #11084 passed with stage
in 30 seconds
......@@ -16,7 +16,7 @@ class UserConnectionFactoryTest extends BaseServiceFactoryTest
public function testCanCreateService()
{
$authService = $this->createMock('Zend\Authentication\AuthenticationService');
$authService = $this->createMock('Laminas\Authentication\AuthenticationService');
$this->serviceManager->expects($this->once())
->method('get')
......
......@@ -3,7 +3,7 @@ namespace UnicaenAuthTest\View\Helper;
use UnicaenAppTest\View\Helper\TestAsset\ArrayTranslatorLoader;
use UnicaenAuth\View\Helper\UserConnection;
use Zend\I18n\Translator\Translator;
use Laminas\I18n\Translator\Translator;
/**
* Description of AppConnectionTest
......@@ -26,15 +26,15 @@ class UserConnectionTest extends AbstractTest
{
parent::setUp();
$this->urlHelper = $this->createMock('Zend\View\Helper\Url'/*, ['__invoke']*/);
$this->urlHelper = $this->createMock('Laminas\View\Helper\Url'/*, ['__invoke']*/);
$this->renderer = $this->createMock('Zend\View\Renderer\PhpRenderer'/*, ['plugin']*/);
$this->renderer = $this->createMock('Laminas\View\Renderer\PhpRenderer'/*, ['plugin']*/);
$this->renderer->expects($this->any())
->method('plugin')
->with('url')
->will($this->returnValue($this->urlHelper));
$this->authService = $this->createMock('Zend\Authentication\AuthenticationService'/*, ['hasIdentity', 'getIdentity']*/);
$this->authService = $this->createMock('Laminas\Authentication\AuthenticationService'/*, ['hasIdentity', 'getIdentity']*/);
$this->helper->setAuthService($this->authService)
->setView($this->renderer)
......
......@@ -16,7 +16,7 @@ class UserCurrentFactoryTest extends BaseServiceFactoryTest
public function testCanCreateService()
{
$authService = $this->createMock('Zend\Authentication\AuthenticationService');
$authService = $this->createMock('Laminas\Authentication\AuthenticationService');
$this->serviceManager->expects($this->once())
->method('get')
......
......@@ -10,9 +10,9 @@ use UnicaenAuth\View\Helper\UserCurrent;
use UnicaenAuth\View\Helper\UserInfo;
use UnicaenAuth\View\Helper\UserProfile;
use UnicaenAuth\View\Helper\UserStatus;
use Zend\I18n\Translator\Translator;
use Zend\View\Helper\InlineScript;
use Zend\View\Renderer\PhpRenderer;
use Laminas\I18n\Translator\Translator;
use Laminas\View\Helper\InlineScript;
use Laminas\View\Renderer\PhpRenderer;
/**
* Description of UserCurrentTest
......
......@@ -16,7 +16,7 @@ class UserInfoFactoryTest extends BaseServiceFactoryTest
public function testCanCreateService()
{
$authService = $this->createMock('Zend\Authentication\AuthenticationService');
$authService = $this->createMock('Laminas\Authentication\AuthenticationService');
$mapper = $this->createMock('UnicaenApp\Mapper\Ldap\Structure');
$this->serviceManager->expects($this->exactly(2))
......
......@@ -3,7 +3,7 @@ namespace UnicaenAuthTest\View\Helper;
use UnicaenAppTest\View\Helper\TestAsset\ArrayTranslatorLoader;
use UnicaenAuth\View\Helper\UserInfo;
use Zend\I18n\Translator\Translator;
use Laminas\I18n\Translator\Translator;
/**
* Description of AppConnectionTest
......@@ -26,7 +26,7 @@ class UserInfoTest extends AbstractTest
{
parent::setUp();
$this->authService = $this->createMock('Zend\Authentication\AuthenticationService'/*, ['hasIdentity', 'getIdentity']*/);
$this->authService = $this->createMock('Laminas\Authentication\AuthenticationService'/*, ['hasIdentity', 'getIdentity']*/);
$this->mapperStructure = $this->createMock('UnicaenApp\Mapper\Ldap\Structure'/*,
['findOneByDn', 'findOnePathByCodeStructure', 'findAllPathByCodeStructure', 'findOneByCodeEntite']*/);
......
......@@ -16,7 +16,7 @@ class UserProfileFactoryTest extends BaseServiceFactoryTest
public function testCanCreateService()
{
$authService = $this->createMock('Zend\Authentication\AuthenticationService');
$authService = $this->createMock('Laminas\Authentication\AuthenticationService');
$authorize = $this->createMock('BjyAuthorize\Service\Authorize'/*, ['getIdentityProvider'], [], '', false*/);
$identityProvider = $this->getMockForAbstractClass('BjyAuthorize\Provider\Identity\ProviderInterface', []);
......
......@@ -3,7 +3,7 @@ namespace UnicaenAuthTest\View\Helper;
use UnicaenAppTest\View\Helper\TestAsset\ArrayTranslatorLoader;
use UnicaenAuth\View\Helper\UserProfile;
use Zend\I18n\Translator\Translator;
use Laminas\I18n\Translator\Translator;
/**
* Description of UserProfileTest
......@@ -44,7 +44,7 @@ class UserProfileTest extends AbstractTest
'user_profile/none-translated.phtml',
],
'role' => [
[new \Zend\Permissions\Acl\Role\GenericRole('Invité')],
[new \Laminas\Permissions\Acl\Role\GenericRole('Invité')],
'user_profile/role.phtml',
'user_profile/role-translated.phtml',
],
......
......@@ -16,7 +16,7 @@ class UserStatusFactoryTest extends BaseServiceFactoryTest
public function testCanCreateService()
{
$authService = $this->createMock('Zend\Authentication\AuthenticationService');
$authService = $this->createMock('Laminas\Authentication\AuthenticationService');
$this->serviceManager->expects($this->once())
->method('get')
......
......@@ -5,7 +5,7 @@ namespace UnicaenAuthTest\View\Helper;
use UnicaenAppTest\View\Helper\TestAsset\ArrayTranslatorLoader;
use UnicaenAuth\Service\UserContext;
use UnicaenAuth\View\Helper\UserStatus;
use Zend\I18n\Translator\Translator;
use Laminas\I18n\Translator\Translator;
/**
* Description of UserProfileTest
......
......@@ -14,4 +14,4 @@ $testConfig = [
],
];
return \Zend\Stdlib\ArrayUtils::merge($appConfig, $testConfig);
return \Laminas\Stdlib\ArrayUtils::merge($appConfig, $testConfig);
......@@ -3,7 +3,7 @@
use UnicaenAuth\Authentication\Adapter;
use UnicaenAuth\Form\LoginForm;
use UnicaenAuth\View\Helper\AbstractConnectViewHelper;
use Zend\Form\Form;
use Laminas\Form\Form;
/**
* Génération des différents types de formulaire de connexion activés.
......
......@@ -13,7 +13,7 @@
use Application\View\Renderer\PhpRenderer;
use UnicaenAuth\Form\LoginForm;
use Zend\Form\Form;
use Laminas\Form\Form;
$this->headTitle("Connexion") ?>
......
<?php
use Zend\Form\Form;
use Laminas\Form\Form;
/**
* @var bool $enabled
......
<?php
use Zend\Form\Form;
use Laminas\Form\Form;
/**
* @var Form $form
......
......@@ -14,12 +14,12 @@ $form->setAttribute('method', 'post');
<?php echo $this->form()->openTag($form) ?>
<dl class="zend_form">
<?php foreach ($form as $element): ?>
<?php if (!$element instanceof Zend\Form\Element\Button): ?>
<?php if (!$element instanceof Laminas\Form\Element\Button): ?>
<dt><?php echo $this->formLabel($element) ?></dt>
<?php endif ?>
<?php if ($element instanceof Zend\Form\Element\Button): ?>
<?php if ($element instanceof Laminas\Form\Element\Button): ?>
<dd><?php echo $this->formButton($element) ?></dd>
<?php elseif ($element instanceof Zend\Form\Element\Captcha): ?>
<?php elseif ($element instanceof Laminas\Form\Element\Captcha): ?>
<dd><?php echo $this->formCaptcha($element) . $this->formElementErrors($element) ?></dd>
<?php else: ?>
<dd><?php echo $this->formInput($element) . $this->formElementErrors($element) ?></dd>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment