Skip to content

Commit 8b2723a

Browse files
committed
Add possibility to disable unit tests for particular modules, if they tests are silently failing
1 parent 975be95 commit 8b2723a

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

app/code/community/EcomDev/PHPUnit/Test/Suite.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ public static function suite()
5050

5151
$suite = new self('Magento Test Suite');
5252

53+
$excludedModules = Mage::getConfig()->getNode('phpunit/suite/exclude');
54+
5355
// Walk through different groups in modules for finding test cases
5456
foreach ($groups->children() as $group) {
5557
foreach ($modules->children() as $module) {
@@ -58,6 +60,10 @@ public static function suite()
5860
$suite->addTest(self::warning('There is no module with name: ' . $module->getName()));
5961
continue;
6062
}
63+
64+
if (isset($excludedModules->{$module->getName()})) {
65+
continue;
66+
}
6167

6268
$moduleCodeDir = Mage::getBaseDir('code') . DS . (string) $realModule->codePool;
6369
$searchPath = Mage::getModuleDir('', $module->getName()) . DS . 'Test' . DS . (string) $group;

app/code/community/EcomDev/PHPUnit/etc/config.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@
5555
</global>
5656
<phpunit>
5757
<suite>
58+
<modules /> <!-- List of modules included into test suite -->
59+
<exclude /> <!-- List of modules that are excluded from test suite -->
5860
<yaml>
5961
<model>ecomdev_phpunit/yaml_loader</model>
6062
<loaders>

0 commit comments

Comments
 (0)