Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
lib
unicaen
auth
Commits
0240732b
Commit
0240732b
authored
Oct 12, 2021
by
Bertrand Gauthier
Browse files
Migration vers laminas
parent
d507f84b
Pipeline
#11068
passed with stage
in 25 seconds
Changes
135
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tests/UnicaenAuthTest/View/Helper/UserConnectionTest.php
View file @
0240732b
...
...
@@ -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
)
...
...
tests/UnicaenAuthTest/View/Helper/UserCurrentFactoryTest.php
View file @
0240732b
...
...
@@ -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'
)
...
...
tests/UnicaenAuthTest/View/Helper/UserCurrentTest.php
View file @
0240732b
...
...
@@ -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
...
...
tests/UnicaenAuthTest/View/Helper/UserInfoFactoryTest.php
View file @
0240732b
...
...
@@ -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
))
...
...
tests/UnicaenAuthTest/View/Helper/UserInfoTest.php
View file @
0240732b
...
...
@@ -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']*/
);
...
...
tests/UnicaenAuthTest/View/Helper/UserProfileFactoryTest.php
View file @
0240732b
...
...
@@ -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'
,
[]);
...
...
tests/UnicaenAuthTest/View/Helper/UserProfileTest.php
View file @
0240732b
...
...
@@ -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'
,
],
...
...
tests/UnicaenAuthTest/View/Helper/UserStatusFactoryTest.php
View file @
0240732b
...
...
@@ -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'
)
...
...
tests/UnicaenAuthTest/View/Helper/UserStatusTest.php
View file @
0240732b
...
...
@@ -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
...
...
tests/config/application.config.php
View file @
0240732b
...
...
@@ -14,4 +14,4 @@ $testConfig = [
],
];
return
\
Zend
\Stdlib\ArrayUtils
::
merge
(
$appConfig
,
$testConfig
);
return
\
Laminas
\Stdlib\ArrayUtils
::
merge
(
$appConfig
,
$testConfig
);
view/unicaen-auth/auth/login-tabs.phtml
View file @
0240732b
...
...
@@ -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.
...
...
view/unicaen-auth/auth/login.phtml
View file @
0240732b
...
...
@@ -13,7 +13,7 @@
use
Application\View\Renderer\PhpRenderer
;
use
UnicaenAuth\Form\LoginForm
;
use
Zend
\Form\Form
;
use
Laminas
\Form\Form
;
$this
->
headTitle
(
"Connexion"
)
?>
...
...
view/unicaen-auth/auth/request-password-reset-form.phtml
View file @
0240732b
<?php
use
Zend
\Form\Form
;
use
Laminas
\Form\Form
;
/**
* @var bool $enabled
...
...
view/unicaen-auth/auth/request-password-reset-success.phtml
View file @
0240732b
<?php
use
Zend
\Form\Form
;
use
Laminas
\Form\Form
;
/**
* @var Form $form
...
...
view/zfc-user/user/register.phtml
View file @
0240732b
...
...
@@ -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>
...
...
Prev
1
…
3
4
5
6
7
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment