Skip to content

Warning No tests found in class "NodeWebTestCase" #6

Description

@jhedstrom

When trying to run .test files that contain a class that doesn't define any tests, PHPUnit skips the rest of the tests in that file, with the warning "Warning No tests found in class "FooTestCase".

Adding a test() method to the class resolves the issue, but I wonder if there is a flag or option in PHPUnit so this wouldn't be necessary?

diff --git a/core/modules/node/node.test b/core/modules/node/node.test
index 1dbcaf3..688b828 100644
--- a/core/modules/node/node.test
+++ b/core/modules/node/node.test
@@ -22,6 +22,8 @@ class NodeWebTestCase extends DrupalWebTestCase {
       $this->drupalCreateContentType(array('type' => 'article', 'name' => 'Article'));
     }
   }
+
+  function test() {}
 }

/**

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions