Filter tests fail
catch - June 4, 2008 - 10:26
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | tests |
| Category: | bug report |
| Priority: | critical |
| Assigned: | boombatower |
| Status: | closed |
Description
Found the requested form at admin/settings/filters/add [Other] Fail
Found the Save configuration button [Other] Fail
Failed to set field name to simpletest_w93x [Other] Fail
Failed to set field roles[2] to 1 [Other] Fail
Failed to set field filters[filter/2] to 1
There are other failures which are due to core bugs rather than the test, RTBC patch here: http://drupal.org/node/161217

#1
Issue is with the createFormat() function which just looks like it's not building the $edit array properly (compared to the filter admin test which passes). I guess it'd be useful to have a reusable function so we could test different combinations of filters and how they interact, but it'll need some work. Definitely a bug in the test rather than anything else though.
#2
The array looks fine.
This was the culprit.
<?php$admin_user = $this->drupalCreateUser(array('administer filters, create page content'));
?>
should be
<?php$admin_user = $this->drupalCreateUser(array('administer filters', 'create page content'));
?>
Very simple to check just place the following code after a
drupalGetordrupalPost.<?phpvar_dump($this->drupalGetContent());
?>
I received an access error, so I check the permissions...
Placed that same code after
<?php$this->drupalGet('node/' . $page->nid);
?>
The assertions are working as they should. The page output contains the links that the code is asserting shouldn't be there. So either the assertions are wrong or the filter is broken.
I would like someone else to take a look at that since I'm not familiar with how the filter should work.
#3
The filter's a bug in the code and there's an RTBC patch here: http://drupal.org/node/161217
This one's good.
#4
Committed to CVS HEAD. Is there a way we can check a permission actually exists? That might prevent these errors.
#5
Doesn't seem like this got committed.
#6
Also patch for checking permissions: #267308: Simpletest: check permissions to make sure they are valid.
#7
I got committed as collateral here so missed getting it's own message: http://drupal.org/cvs?commit=119893
#8
Automatically closed -- issue fixed for two weeks with no activity.