Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
EcomDev_PHPUnit
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Open
EcomDev_PHPUnit
Commits
decb1d48
Commit
decb1d48
authored
Oct 20, 2014
by
Ivan Chepurnyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix minor issues with controller tests for admin panel
parent
c2c493f4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletion
+12
-1
app/code/community/EcomDev/PHPUnit/Test/Case/Helper/Session.php
...de/community/EcomDev/PHPUnit/Test/Case/Helper/Session.php
+11
-0
lib/EcomDev/PHPUnit/Constraint/Layout/Block.php
lib/EcomDev/PHPUnit/Constraint/Layout/Block.php
+1
-1
No files found.
app/code/community/EcomDev/PHPUnit/Test/Case/Helper/Session.php
View file @
decb1d48
...
...
@@ -43,10 +43,19 @@ class EcomDev_PHPUnit_Test_Case_Helper_Session
*/
public
function
helperMockSession
(
$classAlias
,
array
$methods
=
array
())
{
if
(
!
empty
(
$methods
)
&&
!
in_array
(
'start'
,
$methods
,
true
))
{
$methods
[]
=
'start'
;
}
$sessionMock
=
EcomDev_PHPUnit_Helper
::
invoke
(
'mockModel'
,
$classAlias
,
$methods
)
->
disableOriginalConstructor
();
TestUtil
::
replaceByMock
(
'singleton'
,
$classAlias
,
$sessionMock
);
$sessionMock
->
expects
(
$this
->
testCase
->
any
())
->
method
(
'start'
)
->
willReturnSelf
();
return
$sessionMock
;
}
...
...
@@ -58,6 +67,8 @@ class EcomDev_PHPUnit_Test_Case_Helper_Session
*/
public
function
helperAdminSession
(
array
$resources
=
array
())
{
$this
->
helperMockSession
(
'core/session'
,
array
(
'renew'
));
$this
->
helperMockSession
(
'adminhtml/session'
,
array
(
'renew'
));
$session
=
$this
->
helperMockSession
(
'admin/session'
,
array
(
'refreshAcl'
));
$user
=
$this
->
createUser
();
$this
->
loadRules
(
$user
,
$this
->
getAcl
(),
$resources
);
...
...
lib/EcomDev/PHPUnit/Constraint/Layout/Block.php
View file @
decb1d48
...
...
@@ -292,7 +292,7 @@ class EcomDev_PHPUnit_Constraint_Layout_Block extends EcomDev_PHPUnit_Constraint
return
false
;
}
return
$blockInfo
[
'root'
]
===
true
;
return
$blockInfo
[
'
is_
root'
]
===
true
;
}
/**
...
...
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