Commit a7530e13 authored by Dries's avatar Dries

- Patch #1700682 by tim.plunkett, sun: run-tests.sh attempts to run abstract/base test classes.

parent 96e79846
......@@ -12,7 +12,7 @@
/**
* Defines a base class for testing aggregator.module.
*/
class AggregatorTestBase extends WebTestBase {
abstract class AggregatorTestBase extends WebTestBase {
function setUp() {
parent::setUp(array('node', 'block', 'aggregator', 'aggregator_test'));
......
......@@ -10,7 +10,7 @@
use Drupal\comment\Comment;
use Drupal\simpletest\WebTestBase;
class CommentTestBase extends WebTestBase {
abstract class CommentTestBase extends WebTestBase {
protected $profile = 'standard';
protected $admin_user;
......
......@@ -7,7 +7,7 @@
namespace Drupal\field\Tests;
class FieldAttachTestBase extends FieldTestBase {
abstract class FieldAttachTestBase extends FieldTestBase {
function setUp() {
// Since this is a base class for many test cases, support the same
// flexibility that Drupal\simpletest\WebTestBase::setUp() has for the
......
......@@ -12,7 +12,7 @@
/**
* Parent class for Field API tests.
*/
class FieldTestBase extends WebTestBase {
abstract class FieldTestBase extends WebTestBase {
var $default_storage = 'field_sql_storage';
/**
......
......@@ -12,7 +12,7 @@
/**
* Provides common functionality for the Field UI test classes.
*/
class FieldUiTestBase extends WebTestBase {
abstract class FieldUiTestBase extends WebTestBase {
public static $modules = array('node', 'field_ui', 'field_test', 'taxonomy');
function setUp() {
......
......@@ -12,7 +12,7 @@
/**
* Provides methods specifically for testing File module's field handling.
*/
class FileFieldTestBase extends WebTestBase {
abstract class FileFieldTestBase extends WebTestBase {
protected $profile = 'standard';
protected $admin_user;
......
......@@ -32,7 +32,7 @@
/**
* This class provides methods specifically for testing Image's field handling.
*/
class ImageFieldTestBase extends WebTestBase {
abstract class ImageFieldTestBase extends WebTestBase {
protected $admin_user;
function setUp() {
......
......@@ -9,7 +9,7 @@
use Drupal\simpletest\WebTestBase;
class NodeTestBase extends WebTestBase {
abstract class NodeTestBase extends WebTestBase {
function setUp() {
$modules = func_get_args();
if (isset($modules[0]) && is_array($modules[0])) {
......
......@@ -12,7 +12,7 @@
/**
* Provides a base class for testing the Path module.
*/
class PathTestBase extends WebTestBase {
abstract class PathTestBase extends WebTestBase {
function setUp() {
$modules = func_get_args();
if (isset($modules[0]) && is_array($modules[0])) {
......
......@@ -12,7 +12,7 @@
/**
* Defines a base PHP test case class.
*/
class PhpTestBase extends WebTestBase {
abstract class PhpTestBase extends WebTestBase {
protected $php_code_format;
function setUp() {
......
......@@ -9,7 +9,7 @@
use Drupal\simpletest\WebTestBase;
class PollTestBase extends WebTestBase {
abstract class PollTestBase extends WebTestBase {
function setUp() {
$modules = func_get_args();
if (isset($modules[0]) && is_array($modules[0])) {
......
......@@ -9,7 +9,7 @@
use Drupal\simpletest\WebTestBase;
class SearchTestBase extends WebTestBase {
abstract class SearchTestBase extends WebTestBase {
function setUp() {
$modules = func_get_args();
if (isset($modules[0]) && is_array($modules[0])) {
......
......@@ -13,7 +13,7 @@
/**
* Defines base class for shortcut test cases.
*/
class ShortcutTestBase extends WebTestBase {
abstract class ShortcutTestBase extends WebTestBase {
/**
* User with permission to administer shortcuts.
......
......@@ -12,7 +12,7 @@
/**
* Defines a base class for testing the Statistics module.
*/
class StatisticsTestBase extends WebTestBase {
abstract class StatisticsTestBase extends WebTestBase {
function setUp() {
parent::setUp(array('node', 'block', 'statistics'));
......
......@@ -12,7 +12,7 @@
/**
* Base test system for AJAX tests.
*/
class AjaxTestBase extends WebTestBase {
abstract class AjaxTestBase extends WebTestBase {
function setUp() {
$modules = func_get_args();
if (isset($modules[0]) && is_array($modules[0])) {
......
......@@ -12,7 +12,7 @@
/**
* Provides helper methods for cache tests.
*/
class CacheTestBase extends WebTestBase {
abstract class CacheTestBase extends WebTestBase {
protected $default_bin = 'page';
protected $default_cid = 'test_temporary';
protected $default_value = 'CacheTest';
......
......@@ -15,7 +15,7 @@
* Because all database tests share the same test data, we can centralize that
* here.
*/
class DatabaseTestBase extends WebTestBase {
abstract class DatabaseTestBase extends WebTestBase {
function setUp() {
$modules = func_get_args();
if (isset($modules[0]) && is_array($modules[0])) {
......
......@@ -11,7 +11,7 @@
* Base class for file tests that use the file_test module to test uploads and
* hooks.
*/
class FileHookTestBase extends FileTestBase {
abstract class FileHookTestBase extends FileTestBase {
function setUp() {
// Install file_test module
parent::setUp('file_test');
......
......@@ -14,7 +14,7 @@
* Base class for file tests that adds some additional file specific
* assertions and helper functions.
*/
class FileTestBase extends WebTestBase {
abstract class FileTestBase extends WebTestBase {
function setUp() {
$modules = func_get_args();
......
......@@ -13,7 +13,7 @@
/**
* Base class for image manipulation testing.
*/
class ToolkitTestBase extends WebTestBase {
abstract class ToolkitTestBase extends WebTestBase {
protected $toolkit;
protected $file;
protected $image;
......
......@@ -9,7 +9,7 @@
use Drupal\simpletest\WebTestBase;
class MenuTestBase extends WebTestBase {
abstract class MenuTestBase extends WebTestBase {
function setUp() {
$modules = func_get_args();
if (isset($modules[0]) && is_array($modules[0])) {
......
......@@ -15,7 +15,7 @@
/**
* Helper class for module test cases.
*/
class ModuleTestBase extends WebTestBase {
abstract class ModuleTestBase extends WebTestBase {
protected $admin_user;
function setUp() {
......
......@@ -12,7 +12,7 @@
/**
* Provides common helper methods for Taxonomy module tests.
*/
class TaxonomyTestBase extends WebTestBase {
abstract class TaxonomyTestBase extends WebTestBase {
function setUp() {
$modules = func_get_args();
......
......@@ -26,7 +26,7 @@
/**
* Defines some shared functions used by all update tests.
*/
class UpdateTestBase extends WebTestBase {
abstract class UpdateTestBase extends WebTestBase {
/**
* Refreshes the update status based on the desired available update scenario.
......
......@@ -549,6 +549,13 @@ function simpletest_script_get_test_list() {
}
}
// Filter out abstract classes.
foreach ($test_list as $i => $test_class) {
$class_info = new \ReflectionClass($test_class);
if ($class_info->isAbstract()) {
unset($test_list[$i]);
}
}
if (empty($test_list)) {
simpletest_script_print_error('No valid tests were specified.');
exit;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment