upal icon indicating copy to clipboard operation
upal copied to clipboard

Warning No tests found in class "NodeWebTestCase"

Open jhedstrom opened this issue 13 years ago • 0 comments

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() {}
 }

/**

jhedstrom avatar Mar 27 '12 18:03 jhedstrom