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
1e69dbad
Commit
1e69dbad
authored
Oct 31, 2014
by
Ivan Chepurnyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue with current store code
parent
11a82d76
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
app/code/community/EcomDev/PHPUnit/Test/Case/Util.php
app/code/community/EcomDev/PHPUnit/Test/Case/Util.php
+1
-0
app/code/community/EcomDev/PHPUnit/Test/Listener.php
app/code/community/EcomDev/PHPUnit/Test/Listener.php
+3
-3
No files found.
app/code/community/EcomDev/PHPUnit/Test/Case/Util.php
View file @
1e69dbad
...
@@ -511,6 +511,7 @@ class EcomDev_PHPUnit_Test_Case_Util
...
@@ -511,6 +511,7 @@ class EcomDev_PHPUnit_Test_Case_Util
public
static
function
setUp
()
public
static
function
setUp
()
{
{
self
::
app
()
->
resetDispatchedEvents
();
self
::
app
()
->
resetDispatchedEvents
();
self
::
$originalStore
=
Mage
::
app
()
->
getStore
()
->
getCode
();
}
}
/**
/**
...
...
app/code/community/EcomDev/PHPUnit/Test/Listener.php
View file @
1e69dbad
...
@@ -173,6 +173,9 @@ class EcomDev_PHPUnit_Test_Listener implements PHPUnit_Framework_TestListener
...
@@ -173,6 +173,9 @@ class EcomDev_PHPUnit_Test_Listener implements PHPUnit_Framework_TestListener
));
));
if
(
$test
instanceof
PHPUnit_Framework_TestCase
)
{
if
(
$test
instanceof
PHPUnit_Framework_TestCase
)
{
EcomDev_PHPUnit_Helper
::
tearDown
();
EcomDev_PHPUnit_Test_Case_Util
::
tearDown
();
EcomDev_PHPUnit_Test_Case_Util
::
getFixture
(
get_class
(
$test
))
EcomDev_PHPUnit_Test_Case_Util
::
getFixture
(
get_class
(
$test
))
->
setScope
(
EcomDev_PHPUnit_Model_FixtureInterface
::
SCOPE_LOCAL
)
->
setScope
(
EcomDev_PHPUnit_Model_FixtureInterface
::
SCOPE_LOCAL
)
->
discard
();
// Clear applied fixture
->
discard
();
// Clear applied fixture
...
@@ -180,9 +183,6 @@ class EcomDev_PHPUnit_Test_Listener implements PHPUnit_Framework_TestListener
...
@@ -180,9 +183,6 @@ class EcomDev_PHPUnit_Test_Listener implements PHPUnit_Framework_TestListener
if
(
EcomDev_PHPUnit_Test_Case_Util
::
getExpectation
(
get_class
(
$test
))
->
isLoaded
())
{
if
(
EcomDev_PHPUnit_Test_Case_Util
::
getExpectation
(
get_class
(
$test
))
->
isLoaded
())
{
EcomDev_PHPUnit_Test_Case_Util
::
getExpectation
(
get_class
(
$test
))
->
discard
();
EcomDev_PHPUnit_Test_Case_Util
::
getExpectation
(
get_class
(
$test
))
->
discard
();
}
}
EcomDev_PHPUnit_Test_Case_Util
::
tearDown
();
EcomDev_PHPUnit_Helper
::
tearDown
();
}
}
Mage
::
dispatchEvent
(
'phpunit_test_end_after'
,
array
(
Mage
::
dispatchEvent
(
'phpunit_test_end_after'
,
array
(
...
...
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