-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #1693398 by donquixote, pounard, sun, Sylvain Lecoy: Allow PSR-…
…0 test classes to be used in D7.
- Loading branch information
1 parent
de6e29d
commit 7cbe4b7
Showing
11 changed files
with
269 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
modules/simpletest/lib/Drupal/simpletest/Tests/PSR0WebTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
namespace Drupal\simpletest\Tests; | ||
|
||
class PSR0WebTest extends \DrupalWebTestCase { | ||
|
||
public static function getInfo() { | ||
return array( | ||
'name' => 'PSR0 web test', | ||
'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'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
modules/simpletest/tests/psr_0_test/lib/Drupal/psr_0_test/Tests/ExampleTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'); | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
modules/simpletest/tests/psr_0_test/lib/Drupal/psr_0_test/Tests/Nested/NestedExampleTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
name = PSR-0 Test cases | ||
description = Test classes to be discovered by simpletest. | ||
core = 7.x | ||
|
||
hidden = TRUE | ||
package = Testing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<?php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters