This information is from the code coverage report (see http://coverage.cwgordon.com/coverage).
We need to test:
1) Configuring the default filter.
2) A format with no filters.
3) Attempting to add a duplicate filter name.
4) Attempting to delete the default filter.
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | filter_administration_6.patch | 12.51 KB | grndlvl |
| #16 | filter_administration_5.patch | 12.43 KB | grndlvl |
| #13 | filter_administration_4.patch | 13.44 KB | grndlvl |
| #12 | filter_administration_3.patch | 14.12 KB | grndlvl |
| #7 | filter_administration_2_.patch | 4.2 KB | grndlvl |
Comments
Comment #1
catchComment #2
grndlvl commentedComment #3
miklBeen working on this, but we didn't get it done before the session ended..
Comment #4
grndlvl commentedThis patch covers the following:
2) A format with no filters.
3) Attempting to add a duplicate filter name.
4) Attempting to delete the default filter.
Patch written with help from mikl.
The first one seems to have already been done.
Comment #5
miklSweet, good job grndlvl :)
Comment #6
catchLooks pretty good and the tests run fine. Couple of minor code style issues before this is RTBC - inline comments should be written as sentences (start with capital letter, end with full stop), also we usually use $edit as the variable name for form values in drupalPost (although I'm not sure if that's a standard or just habit tbh) - and the $cannot_delete_text look unnecessary to me - about the same number of characters as putting the t calls in assertText() directly. Nice work though :)
Comment #7
grndlvl commentedMade changes mentioned in comment #6.
-Do not really want to change variable name on line 151 to $edit from $empty_format because $empty_format is used throughout the rest of the test. And $edit is too arbitrary to be used throughout the test.
Comment #8
catch$empty_format was my bad, my eyes clearly weren't working properly. Other changes look good and the tests run fine, so marking RTBC.
Comment #9
webchickCode style stuff:
Those look indented too much; possibly tabs?
It's an empty format, not an empty filter.
We concatenate with
' . '(space on either side of the dot). There are a couple other places this needs to be changed as well.Capitalize PHP, I don't quite grok "eval-ed".. do you mean 'executed'? Come to think of it, I don't really understand this message in general. Could you be more specific about what exactly is being tested here?
In general, I'd like to see these test cases split up into separate functions rather than in one big monster list, with the code that needs to be shared between them moved to a setUp() function. Use the DB tests and the file tests, both of which were most recently added, for a guideline on how to split things up.
Comment #10
grndlvl commentedComment #11
lilou commentedComment #12
grndlvl commentedBegan working on suggestions from #9, ran into issues with two of the tests. Kind of late here going to bed just placing new patch work up just in case someone felt like working on it until I get to the problems.
Comment #13
grndlvl commentedMade changes suggested by #9 throughout the whole test.
Comment #14
grndlvl commentedComment #15
Anonymous (not verified) commentedThe last submitted patch failed testing.
Comment #16
grndlvl commentedComment #18
grndlvl commentedFixed patch. Was not done from docroot :/ whoops.
Comment #19
grndlvl commentedComment #21
catchMoving this out of the critical bugs queue - see #607038: Meta issue: fix gaps in code coverage.
Comment #22
sun.core commentedMost of this is already covered in HEAD.
However, some of the introduced test functions are really good ideas. So let's re-roll this sucker and get it in.
Comment #23
sunComment #24
sunComment #25
wim leersMost if not all of this is already in
Drupal\filter\Tests\FilterAdminTest. Filter module's test coverage has been expanded quite a bit since 2010. Closing.