Right now the AJAXTestCase class lives in simpletest/test/ajax.test.
I ran into this by trying to find the assertCommand in the api docs (api.drupal.org) and noticing I couldn't find it. After doing a quick qrep I notice the AjaxTextCase class is actually defined inside a .test file causing it not be be searchable by the api site (api.drupal.org). At least I'm assuming thats why is not being search.
I'm thinking this can probably be moved into a simpletest/drupal_ajax_test_case.php file.
Also the class should be a little more generic right now it assumes you'll always want to enabled the ajax_test and ajax_form_test module. I don't think this is always the case.
<?php
class AJAXTestCase extends DrupalWebTestCase {
function setUp() {
...
parent::setUp(array_unique(array_merge(array('ajax_test', 'ajax_forms_test'), $modules)));
...
?>
In my case I just want to use the assertCommand function. It should be noted, I can easily just set up my test class to extend from AJAXTestCase but the big issue for me, is the documentation and the extra modules being enabled.
Comments
Comment #1
rfayAll core tests that have no other home currently live in simpletest. It's an awkward place and there have been moves to get them out of there.
They *should* still be picked up by api.drupal.org; there's no reason that being there obscures them. A patch to improve the test is welcome.
Comment #2
swentel commentedThis is not fully fixed in D8 - not sure we can still fix this in D7 though.