- simpletest will drop the whole test database in the end of each test so tearDown should not be needed.
- there is a missing parent::setUp(); in the beginning of each setUp()
- the biblio module needs to be enabled in each setUp() with parent::setUp('biblio');
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | 908034_6_biblio_simpletest.patch | 15.5 KB | scor |
| #2 | 908034_2_biblio_simpletest.patch | 4.13 KB | scor |
| #1 | 908034_1_biblio_simpletest.patch | 3.39 KB | scor |
Comments
Comment #1
scor commentedComment #2
scor commentedSome tests were failing due to the old D7 title as a field. Reverted to current title model. The keywords test was also failing due to biblio_get_keyword_by_id() returns a PDO db value, which needs to be cast to an array.
All biblio test are now passing on my machine with the latest HEAD.
Comment #3
rjerome commentedThanks very much Stéphane,
Given the likely release of 7.x in the not so distant future, I've just recently started looking at the 7.x code base again. I should warn you that there are likely to be some fairly significant changes in the near future, becuase I'm going to merge in all the work I did in the 6.x-2.x branch.
I will include those changes to the tests.
Cheers,
Ron.
Comment #4
scor commentedThat's great! Looking forward to see the changes landing in D7. May I ask you a rough estimate ETA for this merge D6.2 -> D7? Shall I stop digging into Biblio 7.x and I wait then?
Comment #5
rjerome commentedI'm just cleaning it up now, hopefully I can get something up this weekend.
Comment #6
scor commentedI was going to close this issue seeing the patch #2 was committed as part of the mega gigantic message-less commit http://drupal.org/cvs?commit=420636 but I found more issues that needs fixing in export.import.test (due to the new 6.x-2.x changes brought in 7.x).
So far I've only had time to fix the first test method testBiblioNodeExport() which passes. I had to make several fixes through the biblio modules which I'm attaching in this patch.
Comment #7
scor commentedBelow I'm providing a patch review to make Ron's job a bit easier :) I'm not familliar with the API changes on the module, so please correct me if I'm wrong!
db_result is no longer part of D7.
module_invoke requires a valid module name as first parameter. all biblio modules are named using the convention biblio_FORMAT.
switched all .install _save_FORMAT_maps() to D7 database API.
there was a typo in the placeholder.
fix an access to empty attribute error.
This is where not following Drupal's coding standards can bite :( - drupal_write_record() was executed despite the return, and because it's missing ; right after the return.
it seems biblio.type.mapper.inc does not exist and is no longer necessary.
we need all the modules to perform the tests
the endnote8_export is located in the same folder as biblio_xml module.
these functions were renamed it seems...
it seems all the old biblio_get_field_map etc were centralized in biblio_get_map().
Powered by Dreditor.
Comment #8
rjerome commentedThanks,
I could have put the CVS comment "changed everything" but I thought that was about as useful as nothing :-P
BTW, I should also mention that (as you are obviously well aware) the 7.x-dev version is not yet a working entity but I wanted to get what I had into the repository so I could work on it from other locations.
Thanks for all the above pointers that will save some time.
Ron.
Comment #9
rjerome commentedApplied most of the patches in #6
except..
Need to test this one a bit
$type is the module name already.
Cheers,
Ron.
Comment #10
liam morlandTest run since #3030134: Make tests pass. Further improvements to testing is welcome.