We will work on Apr 26th (Saturday) and will be off from Apr 30th (Wednesday) until May 2nd (Friday) for public holiday in our country

Commit 013b9714 authored by Ivan Chepurnyi's avatar Ivan Chepurnyi

! Feature #58 Trying to set developer mode gives error

parent 8c7ce8e2
......@@ -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;
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment