From 7cbe4b7e265343773c2cd2e50b86c68182a64f8e Mon Sep 17 00:00:00 2001 From: David Rothstein Date: Mon, 1 Apr 2013 22:50:18 -0400 Subject: Issue #1693398 by donquixote, pounard, sun, Sylvain Lecoy: Allow PSR-0 test classes to be used in D7. --- .../lib/Drupal/psr_0_test/Tests/ExampleTest.php | 18 ++++++++++++++++++ .../psr_0_test/Tests/Nested/NestedExampleTest.php | 18 ++++++++++++++++++ modules/simpletest/tests/psr_0_test/psr_0_test.info | 6 ++++++ modules/simpletest/tests/psr_0_test/psr_0_test.module | 1 + 4 files changed, 43 insertions(+) create mode 100644 modules/simpletest/tests/psr_0_test/lib/Drupal/psr_0_test/Tests/ExampleTest.php create mode 100644 modules/simpletest/tests/psr_0_test/lib/Drupal/psr_0_test/Tests/Nested/NestedExampleTest.php create mode 100644 modules/simpletest/tests/psr_0_test/psr_0_test.info create mode 100644 modules/simpletest/tests/psr_0_test/psr_0_test.module (limited to 'modules/simpletest/tests') 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 @@ + '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 @@ + '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 @@ +