Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
http://drupal.org/node/265828 is incomplete and destined to remain so.
So how about instead we put all assertFoo() methods into an assertions documentation group?
Comments
Comment #1
jhodgdonI don't see why they need to be in a group. If you go to the web test class, you'll see all the methods listed:
http://api.drupal.org/api/drupal/modules!simpletest!drupal_web_test_case...
(and as soon as we get api.drupal.org to d7 that class hierarchy at the top will be smaller, sorry about that!)
I agree that the page in question is fairly useless though. I think it should be replaced by a link to the DrupalWebTestCase page.
So I recommend closing this as "works as designed"...
Comment #2
joachim CreditAttribution: joachim commentedI disagree.
Even without the hierarchy, if you're looking for a list of assertion functions, that page is muddied by class properties and all the other methods.
Secondly, a grep for 'function assert' on the D7 codebase produces a ton of files that define assertion methods, eg:
modules/file/tests/file.test
182: function assertFileExists($file, $message = NULL) {
190: function assertFileEntryExists($file, $message = NULL) {
200: function assertFileNotExists($file, $message = NULL) {
208: function assertFileEntryNotExists($file, $message) {
217: function assertFileIsPermanent($file, $message = NULL) {
1030: function assertPathMatch($expected_path, $actual_path, $message) {
which arguably you might want to know exist if you want to write tests for your own module that works with files.
Comment #3
jhodgdonYeah, a grep is not useful. You just need to look at methods starting with "assert" that are listed on the DrupalWebTestBase class page.
The problem with defining a @defgroup is that it has to be maintained. IMO the tradeoff between maintaining the group (making sure all the methods are added) vs. just telling people "Take a look at the methods list for DrupalWebTestBase on api.drupal.org. Anything starting with "assert" is a test assertion." is not worth it, since the latter method is guaranteed to find all the assertions and the former requires a lot of work.
Again, in the D7 version of the API module (which will hopefully be deployed to api.d.o soon), this page will be somewhat cleaner.
Comment #15
quietone CreditAttribution: quietone at PreviousNext commentedTriaged during a triage meeting in #documentation.
In #3 @jhodgdon explains why doing this is high maintenance and that doing a search will always provide the list.
Therefor, I am closing this as a won't fix.