To ensure that the placement of microdata attributes isn't affected by future changes to the code, we should add tests.
| Comment | File | Size | Author |
|---|---|---|---|
| #24 | 1385860-24-microdata_test.patch | 4.45 KB | colette |
| #16 | 1385860-16-microdata-test.patch | 5.61 KB | linclark |
| #12 | 1385860-06-microdata-test.patch | 5.92 KB | ericduran |
| #6 | 1385860-06-microdata-test.patch | 5.92 KB | linclark |
| #1 | 1385860-01-test_microdata.patch | 3.16 KB | linclark |
Comments
Comment #1
Anonymous (not verified) commentedThe attached patch tests microdata placement for all three field widgets.
Comment #3
ericduran commentedOh how did I miss this.
Don't pay attention to drupal.org test, it's broken :-/
Comment #4
Anonymous (not verified) commentedI'm probably going to be rewriting this test based on #1554778: Refactor tests to use MicrodataPHP parsing library. I will post here when I have the updated patch.
Comment #5
ericduran commentedAh cool, by the way all the test fivestar test on drupal.org are now fixed so you can ignore my previous comment.
Comment #6
Anonymous (not verified) commentedHere is the microdata test.
I added the test as a separate file. It extends the base test class, but needs to enable microdata module in order to work. To do this, I had to add a little logic for reading in arguments to setUp and passing them through to parent::setUp.
EDIT: Note that the first test will fail until #1379072: Extend microdata support to "Stars (rated while viewing)" and "Select list" widgets is committed.
Comment #8
Anonymous (not verified) commented#6: 1385860-06-microdata-test.patch queued for re-testing.
Comment #10
ericduran commentedI'll re-submit the test now.
Comment #11
ericduran commented#6: 1385860-06-microdata-test.patch queued for re-testing.
Comment #12
ericduran commentedTestbot went crazy, I'm going to try re-uploading the file.
Comment #14
ericduran commentedSo this is the error "Fatal error: Class 'MicrodataFieldTestCase' not found"
I'm pretty sure this is happening because fivestar doesn't depend on microdata so pifr doesn't know to download it for that test.
I've seen this come up before I believe there's a work around but I don't remember what it is.
Comment #15
ericduran commentedOk here's more info on it. http://drupal.org/node/924090#comment-3527572
Apparently we could just make the testbot skip the test. That's about it.
Comment #16
Anonymous (not verified) commentedWow thank you for finding that issue, I didn't even realize it existed.
I would just like to try something to see if it will work... I will add the dependency line to a future patch, but I want to see if instantiating MicrodataFieldTestCase after the call to setUp will work.
Comment #17
Anonymous (not verified) commentedComment #19
ericduran commentedI'm curious what would happend if we have a fivestar_test.module which microdata as a dependency. I'm going to try it and see if it works that way.
Comment #20
Anonymous (not verified) commentedNow that the GSOC student has started, I think I'm going to pull this integration test (and all of the contrib field formatter integration tests) into the microdata project, just so that the process is simpler and we can easily run them all at once. At the end of the summer, I might see if I can get them in to all of the relevant projects.
Eric, is that cool with you?
Comment #21
ericduran commentedYep, cool with me :)
Comment #22
Anonymous (not verified) commentedCool, I'll move it over to the Microdata project, then.
Comment #23
Anonymous (not verified) commentedTitle change.
Comment #24
colette commentedI rewrote the test into the microdata module.