Skip to content
Snippets Groups Projects
Commit 2e9db3e6 authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2333747 by jhedstrom, tim.plunkett: Fixed run-tests.sh ignores phpunit...

Issue #2333747 by jhedstrom, tim.plunkett: Fixed run-tests.sh ignores phpunit tests when using the --module flag.
parent 1efaefb1
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -207,7 +207,9 @@ public function findAllClassFiles($extension = NULL) { ...@@ -207,7 +207,9 @@ public function findAllClassFiles($extension = NULL) {
$classmap = array(); $classmap = array();
$namespaces = $this->registerTestNamespaces(); $namespaces = $this->registerTestNamespaces();
if (isset($extension)) { if (isset($extension)) {
$namespaces = array_intersect_key($namespaces, array_flip(preg_grep('/' . preg_quote("Drupal\\$extension\\", '/') . '/', array_keys($namespaces)))); // Include tests in the \Drupal\Tests\{$extension} namespace.
$pattern = "/Drupal\\\(Tests\\\)?$extension\\\/";
$namespaces = array_intersect_key($namespaces, array_flip(preg_grep($pattern, array_keys($namespaces))));
} }
foreach ($namespaces as $namespace => $paths) { foreach ($namespaces as $namespace => $paths) {
foreach ($paths as $path) { foreach ($paths as $path) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment