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
66923042
Commit
66923042
authored
Jun 28, 2013
by
Ivan Chepurnyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
! Fix Magento 1.8 CE issue with shell abstract class
parent
2106b5e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
5 deletions
+12
-5
shell/ecomdev-phpunit.php
shell/ecomdev-phpunit.php
+12
-5
No files found.
shell/ecomdev-phpunit.php
View file @
66923042
...
@@ -16,8 +16,18 @@
...
@@ -16,8 +16,18 @@
* @author Ivan Chepurnyi <ivan.chepurnyi@ecomdev.org>
* @author Ivan Chepurnyi <ivan.chepurnyi@ecomdev.org>
*/
*/
require_once
'abstract.php'
;
require_once
'abstract.php'
;
// Only this workaround fixes Magento core issue in 1.8 :(
$abstractShell
=
new
ReflectionClass
(
'Mage_Shell_Abstract'
);
define
(
'PHPUNIT_MAGE_PATH'
,
dirname
(
dirname
(
$abstractShell
->
getFileName
())));
$appFile
=
PHPUNIT_MAGE_PATH
.
DIRECTORY_SEPARATOR
.
'app'
.
DIRECTORY_SEPARATOR
.
'Mage.php'
;
require_once
$appFile
;
/**
/**
* Shell script for autoinstalling of required files for phpunit extension
* Shell script for autoinstalling of required files for phpunit extension
*
*
...
@@ -110,7 +120,7 @@ Defined actions:
...
@@ -110,7 +120,7 @@ Defined actions:
--db-pwd <string> Changes test DB password
--db-pwd <string> Changes test DB password
--same-db <bool> Changes same db usage flag for unit tests
--same-db <bool> Changes same db usage flag for unit tests
--url-rewrite <bool> Changes use of url rewrites for unit tests
--url-rewrite <bool> Changes use of url rewrites for unit tests
--base
_
url <string> Changes base url for controller tests
--base
-
url <string> Changes base url for controller tests
show-version Shows current version of the module
show-version Shows current version of the module
...
@@ -127,15 +137,12 @@ USAGE;
...
@@ -127,15 +137,12 @@ USAGE;
*/
*/
public
function
run
()
public
function
run
()
{
{
// We need only include mage, but not run app
require_once
$this
->
_getRootPath
()
.
'app'
.
DIRECTORY_SEPARATOR
.
'Mage.php'
;
if
(
!
$this
->
getArg
(
'action'
)
&&
!
$this
->
getArg
(
'a'
))
{
if
(
!
$this
->
getArg
(
'action'
)
&&
!
$this
->
getArg
(
'a'
))
{
die
(
$this
->
usageHelp
());
die
(
$this
->
usageHelp
());
}
}
$this
->
_args
[
'module'
]
=
dirname
(
dirname
(
__FILE__
));
$this
->
_args
[
'module'
]
=
dirname
(
dirname
(
__FILE__
));
$this
->
_args
[
'project'
]
=
dirname
(
getcwd
())
;
$this
->
_args
[
'project'
]
=
PHPUNIT_MAGE_PATH
;
$action
=
$this
->
getArg
(
'action'
)
?:
$this
->
getArg
(
'a'
);
$action
=
$this
->
getArg
(
'action'
)
?:
$this
->
getArg
(
'a'
);
switch
(
$action
)
{
switch
(
$action
)
{
...
...
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