Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
bibliossimo
opacce
Commits
027efb7b
Commit
027efb7b
authored
May 31, 2018
by
Ghislain Loas
Browse files
dev #75742 fix failures and warnings
parent
7d5a0242
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
37 additions
and
25 deletions
+37
-25
library/ZendAfi/Controller/Action/Helper/AlbumListViewMode.php
...ry/ZendAfi/Controller/Action/Helper/AlbumListViewMode.php
+1
-1
library/digital_resources/Cvs/tests/CvsTest.php
library/digital_resources/Cvs/tests/CvsTest.php
+1
-1
tests/application/modules/admin/controllers/AlbumControllerTest.php
...ication/modules/admin/controllers/AlbumControllerTest.php
+1
-1
tests/library/ZendAfi/View/Helper/TagBanniereTest.php
tests/library/ZendAfi/View/Helper/TagBanniereTest.php
+34
-22
No files found.
library/ZendAfi/Controller/Action/Helper/AlbumListViewMode.php
View file @
027efb7b
...
...
@@ -128,7 +128,7 @@ class ZendAfi_Controller_Action_Helper_AlbumListViewMode extends ZendAfi_Control
}
public
function
getItemsCols
()
{
public
function
getItemsCols
(
$view
)
{
return
[
$this
->
_
(
'Liste des albums'
)];
}
...
...
library/digital_resources/Cvs/tests/CvsTest.php
View file @
027efb7b
...
...
@@ -21,7 +21,7 @@
class
CvsActivatedTestCase
extends
AbstractControllerTestCase
{
abstract
class
CvsActivatedTestCase
extends
AbstractControllerTestCase
{
protected
$_storm_default_to_volatile
=
true
,
$_user
;
...
...
tests/application/modules/admin/controllers/AlbumControllerTest.php
View file @
027efb7b
...
...
@@ -1652,7 +1652,7 @@ class Admin_AlbumControllerEditAlbumMesBDAsPopupTest extends Admin_AlbumControll
/**
* @dataProvider getDispatchUrlAndParams
* @dataProvider getDispatchUrl
Popup
AndParams
* @test
**/
public
function
formActionShouldContainsUrlParams
(
$url
,
$params
)
{
...
...
tests/library/ZendAfi/View/Helper/TagBanniereTest.php
View file @
027efb7b
...
...
@@ -31,35 +31,47 @@ class ZendAfi_View_Helper_TagBanniereCycleTest extends ViewHelperTestCase {
defineConstant
(
"PATH_SKIN"
,
""
);
$content
=
new
Class_Entity
([
'Files'
=>
[
'ban1.jpg'
,
'ban2.jpg'
]]);
$this
->
file_system
=
$this
->
createMock
(
'Class_Testing_FileSystem'
,[
'readdir'
,
'opendir'
,
'file_exists'
,
'mkdir'
,
'closedir'
]);
$this
->
file_system
->
expects
(
$this
->
at
(
2
))
->
method
(
'readdir'
)
->
will
(
$this
->
returnValue
(
'ban1.jpg'
));
$this
->
file_system
->
expects
(
$this
->
at
(
3
))
->
method
(
'readdir'
)
->
will
(
$this
->
returnValue
(
'ban2.jpg'
));
$this
->
file_system
->
expects
(
$this
->
any
())
->
method
(
'readdir'
)
->
will
(
$this
->
returnValue
(
false
));
$this
->
file_system
->
expects
(
$this
->
any
())
->
method
(
'opendir'
)
->
will
(
$this
->
returnValue
(
'afile.jpg'
));
$this
->
file_system
->
expects
(
$this
->
any
())
->
method
(
'file_exists'
)
->
will
(
$this
->
returnValue
(
true
));
$this
->
file_system
->
expects
(
$this
->
any
())
->
method
(
'mkdir'
)
->
will
(
$this
->
returnValue
(
false
));
$this
->
file_system
->
expects
(
$this
->
any
())
->
method
(
'closedir'
)
->
will
(
$this
->
returnValue
(
null
));
Class_Profil
::
setFileSystem
(
$this
->
file_system
);
$this
->
profil
=
$this
->
fixture
(
'Class_Profil'
,
[
'id'
=>
999
,
'header_img_cycle'
=>
true
]);
$this
->
file_system
=
$this
->
mock
()
$this
->
_helper
=
new
ZendAfi_View_Helper_TagBanniere
();
$this
->
_helper
->
setView
(
new
ZendAfi_Controller_Action_Helper_View
());
$this
->
_helper
->
view
->
profil
=
Class_Profil
::
getLoader
()
->
newInstanceWithId
(
4
)
->
setHeaderImgCycle
(
true
);
->
whenCalled
(
'file_exists'
)
->
with
(
'./userfiles/bannieres'
)
->
answers
(
'true'
)
->
whenCalled
(
'opendir'
)
->
with
(
'./userfiles/bannieres'
)
->
answers
(
$content
)
->
whenCalled
(
'readdir'
)
->
with
(
$content
)
->
willDo
(
function
()
use
(
$content
)
{
$files
=
$content
->
getFiles
();
$read
=
array_shift
(
$files
);
$content
->
setFiles
(
$files
);
return
$read
?
$read
:
false
;
})
->
whenCalled
(
'closedir'
)
->
with
(
$content
)
->
answers
(
true
)
->
beStrict
();
Class_Profil
::
setFileSystem
(
$this
->
file_system
);
$this
->
view
->
profil
=
$this
->
fixture
(
'Class_Profil'
,
[
'id'
=>
999
,
'header_img_cycle'
=>
true
]);
$this
->
_helper
=
new
ZendAfi_View_Helper_TagBanniere
();
$this
->
_helper
->
setView
(
$this
->
view
);
$this
->
_html
=
$this
->
_helper
->
tagBanniere
();
}
/** @test */
function
divBanniereShouldBePresent
()
{
$this
->
assertXPath
(
$this
->
_html
,
'//div[@id="banniere"]'
);
...
...
Write
Preview
Markdown
is supported
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