summaryrefslogtreecommitdiff
path: root/modules/simpletest/simpletest.test
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2015-03-29 16:59:36 -0400
committerDavid Rothstein <drothstein@gmail.com>2015-03-29 16:59:36 -0400
commit731a540f839d9437fa9317d1e6405dd478621628 (patch)
tree32827897b86d16ff2301af4a5a70cd622066751b /modules/simpletest/simpletest.test
parentab192786436ba867cc84ad4caca26372561845fd (diff)
downloadbrdo-731a540f839d9437fa9317d1e6405dd478621628.tar.gz
brdo-731a540f839d9437fa9317d1e6405dd478621628.tar.bz2
Issue #2293767 by tstoeckler: Allow PSR-4 test classes to be used in Drupal 7.
Diffstat (limited to 'modules/simpletest/simpletest.test')
-rw-r--r--modules/simpletest/simpletest.test9
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/simpletest/simpletest.test b/modules/simpletest/simpletest.test
index dde162ec7..f22ef9557 100644
--- a/modules/simpletest/simpletest.test
+++ b/modules/simpletest/simpletest.test
@@ -703,7 +703,9 @@ class SimpleTestDiscoveryTestCase extends DrupalWebTestCase {
$classes_all = simpletest_test_get_all();
foreach (array(
'Drupal\\simpletest\\Tests\\PSR0WebTest',
+ 'Drupal\\simpletest\\Tests\\PSR4WebTest',
'Drupal\\psr_0_test\\Tests\\ExampleTest',
+ 'Drupal\\psr_4_test\\Tests\\ExampleTest',
) as $class) {
$this->assert(!empty($classes_all['SimpleTest'][$class]), t('Class @class must be discovered by simpletest_test_get_all().', array('@class' => $class)));
}
@@ -726,15 +728,20 @@ class SimpleTestDiscoveryTestCase extends DrupalWebTestCase {
// Don't expect PSR-0 tests to be discovered on older PHP versions.
return;
}
- // This one is provided by simpletest itself via PSR-0.
+ // These are provided by simpletest itself via PSR-0 and PSR-4.
$this->assertText('PSR0 web test');
+ $this->assertText('PSR4 web test');
$this->assertText('PSR0 example test: PSR-0 in disabled modules.');
+ $this->assertText('PSR4 example test: PSR-4 in disabled modules.');
$this->assertText('PSR0 example test: PSR-0 in nested subfolders.');
+ $this->assertText('PSR4 example test: PSR-4 in nested subfolders.');
// Test each test individually.
foreach (array(
'Drupal\\psr_0_test\\Tests\\ExampleTest',
'Drupal\\psr_0_test\\Tests\\Nested\\NestedExampleTest',
+ 'Drupal\\psr_4_test\\Tests\\ExampleTest',
+ 'Drupal\\psr_4_test\\Tests\\Nested\\NestedExampleTest',
) as $class) {
$this->drupalGet('admin/config/development/testing');
$edit = array($class => TRUE);