summaryrefslogtreecommitdiff
path: root/modules/simpletest/tests
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2013-04-01 22:50:18 -0400
committerDavid Rothstein <drothstein@gmail.com>2013-04-01 22:50:18 -0400
commit7cbe4b7e265343773c2cd2e50b86c68182a64f8e (patch)
tree482c920dfba10c492cafb9f4aa84034086d56a56 /modules/simpletest/tests
parentde6e29d084adc900fa8c93510efa2679ce82abea (diff)
downloadbrdo-7cbe4b7e265343773c2cd2e50b86c68182a64f8e.tar.gz
brdo-7cbe4b7e265343773c2cd2e50b86c68182a64f8e.tar.bz2
Issue #1693398 by donquixote, pounard, sun, Sylvain Lecoy: Allow PSR-0 test classes to be used in D7.
Diffstat (limited to 'modules/simpletest/tests')
-rw-r--r--modules/simpletest/tests/psr_0_test/lib/Drupal/psr_0_test/Tests/ExampleTest.php18
-rw-r--r--modules/simpletest/tests/psr_0_test/lib/Drupal/psr_0_test/Tests/Nested/NestedExampleTest.php18
-rw-r--r--modules/simpletest/tests/psr_0_test/psr_0_test.info6
-rw-r--r--modules/simpletest/tests/psr_0_test/psr_0_test.module1
4 files changed, 43 insertions, 0 deletions
diff --git a/modules/simpletest/tests/psr_0_test/lib/Drupal/psr_0_test/Tests/ExampleTest.php b/modules/simpletest/tests/psr_0_test/lib/Drupal/psr_0_test/Tests/ExampleTest.php
new file mode 100644
index 000000000..3098c925f
--- /dev/null
+++ b/modules/simpletest/tests/psr_0_test/lib/Drupal/psr_0_test/Tests/ExampleTest.php
@@ -0,0 +1,18 @@
+<?php
+
+namespace Drupal\psr_0_test\Tests;
+
+class ExampleTest extends \DrupalWebTestCase {
+
+ public static function getInfo() {
+ return array(
+ 'name' => 'PSR0 example test: PSR-0 in disabled modules.',
+ 'description' => 'We want to assert that this test case is being discovered.',
+ 'group' => 'SimpleTest',
+ );
+ }
+
+ function testArithmetics() {
+ $this->assert(1 + 1 == 2, '1 + 1 == 2');
+ }
+}
diff --git a/modules/simpletest/tests/psr_0_test/lib/Drupal/psr_0_test/Tests/Nested/NestedExampleTest.php b/modules/simpletest/tests/psr_0_test/lib/Drupal/psr_0_test/Tests/Nested/NestedExampleTest.php
new file mode 100644
index 000000000..324ed439a
--- /dev/null
+++ b/modules/simpletest/tests/psr_0_test/lib/Drupal/psr_0_test/Tests/Nested/NestedExampleTest.php
@@ -0,0 +1,18 @@
+<?php
+
+namespace Drupal\psr_0_test\Tests\Nested;
+
+class NestedExampleTest extends \DrupalWebTestCase {
+
+ public static function getInfo() {
+ return array(
+ 'name' => 'PSR0 example test: PSR-0 in nested subfolders.',
+ 'description' => 'We want to assert that this PSR-0 test case is being discovered.',
+ 'group' => 'SimpleTest',
+ );
+ }
+
+ function testArithmetics() {
+ $this->assert(1 + 1 == 2, '1 + 1 == 2');
+ }
+}
diff --git a/modules/simpletest/tests/psr_0_test/psr_0_test.info b/modules/simpletest/tests/psr_0_test/psr_0_test.info
new file mode 100644
index 000000000..48ca8d850
--- /dev/null
+++ b/modules/simpletest/tests/psr_0_test/psr_0_test.info
@@ -0,0 +1,6 @@
+name = PSR-0 Test cases
+description = Test classes to be discovered by simpletest.
+core = 7.x
+
+hidden = TRUE
+package = Testing
diff --git a/modules/simpletest/tests/psr_0_test/psr_0_test.module b/modules/simpletest/tests/psr_0_test/psr_0_test.module
new file mode 100644
index 000000000..b3d9bbc7f
--- /dev/null
+++ b/modules/simpletest/tests/psr_0_test/psr_0_test.module
@@ -0,0 +1 @@
+<?php