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
013b9714
Commit
013b9714
authored
Jul 10, 2011
by
Ivan Chepurnyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
! Feature #58 Trying to set developer mode gives error
parent
8c7ce8e2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
5 deletions
+21
-5
app/code/community/EcomDev/PHPUnit/Test/Suite/Group.php
app/code/community/EcomDev/PHPUnit/Test/Suite/Group.php
+21
-5
No files found.
app/code/community/EcomDev/PHPUnit/Test/Suite/Group.php
View file @
013b9714
...
...
@@ -25,6 +25,13 @@ class EcomDev_PHPUnit_Test_Suite_Group extends PHPUnit_Framework_TestSuite
{
const
NO_GROUP_KEYWORD
=
'__nogroup__'
;
/**
* Name of suite that will be printed in tap/testdox format
*
* @var string
*/
protected
$suiteName
=
null
;
/**
* Contructor adds test groups defined on global level
* and adds additional logic for test names retrieval
...
...
@@ -44,14 +51,12 @@ class EcomDev_PHPUnit_Test_Suite_Group extends PHPUnit_Framework_TestSuite
$theClass
->
getName
()
);
if
(
isset
(
$annotation
[
'name'
]))
{
$name
=
$annotations
[
'name'
];
}
else
{
$name
=
sprintf
(
'Test suite for %s'
,
$theClass
->
getName
());
if
(
isset
(
$annotations
[
'name'
]))
{
$this
->
suiteName
=
$annotations
[
'name'
];
}
// Creates all test instances
parent
::
__construct
(
$theClass
,
$name
);
parent
::
__construct
(
$theClass
);
// Just sort-out them by our internal groups
foreach
(
$groups
as
$group
)
{
...
...
@@ -81,4 +86,15 @@ class EcomDev_PHPUnit_Test_Suite_Group extends PHPUnit_Framework_TestSuite
unset
(
$this
->
groups
[
self
::
NO_GROUP_KEYWORD
]);
}
}
/**
* Outputs test suite name from annotations
*
* (non-PHPdoc)
* @see PHPUnit_Framework_TestSuite::toString()
*/
public
function
toString
()
{
return
$this
->
suiteName
!==
null
?
$this
->
suiteName
:
$this
->
name
;
}
}
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