This may be really hard to replicate, but here's the scenario.

* I have a feature which has a dependency to page_title.
* I am writing a DrupalWebTestCase which uses the feature.
* I get an ajax error of node_page_title_alter() already having been defined, when I try to run the test.
* The error goes away if I change line 658 in page_title.module to:
include_once DRUPAL_ROOT . "/{$info['path']}/{$module}.page_title.inc";

* I also tested and the error goes away if I rely on the standard static var; which leads me to think there is a problem with drupal_static() OR it is getting reset somewhere in the module, during the test process.
static $runonce = FALSE;

So my conclusion is that something in the test scenario is reseting the static $runonce. Hopefully this report can be of some help.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

igor.ro’s picture

Have the same problem
It is easy to reproduce by running tests with simple test clone module

Here is patch