Petr Skoda
4454447d56
MDL-20700 whitespace terror returns
2009-12-16 22:14:17 +00:00
Eloy Lafuente
c6adec25bb
MDL-21015 enable xmldb_structures cache for UnitTestCaseUsingDatabase.
...
Example: Yay, grade tests 40 mins down to 50 secs!
2009-12-01 18:30:21 +00:00
Eloy Lafuente
04aa2fd6c6
MDL-21015 - prevent dead end under uncontrolled situations where cleanup doesn't happen on destruct
2009-12-01 14:27:39 +00:00
Petr Skoda
117bd74897
MDL-20700 coding style cleanup - cvs keywords removed, closign php tag removed, trailing whitespace cleanup
2009-11-01 11:31:16 +00:00
tjhunt
3d39d775fa
unittests: NOBUG further fix to HTML expectations - prevent side-effects.
2009-09-30 17:01:05 +00:00
tjhunt
91b652ac58
unittests: NOBUG further fix to HTML expectations.
2009-09-30 16:54:49 +00:00
tjhunt
d4bc6be7e8
unittests: NOBUG fix expectations for content with various types of HTML.
...
Also, refactor to reduce duplicate code.
2009-09-30 14:52:12 +00:00
nicolasconnault
4c53f626bd
MDL-19840 Fixed detection of empty attributes
2009-07-29 01:23:47 +00:00
nicolasconnault
f8065dd287
MDL-19756 Migrated the following functions from weblib to outputlib:
...
1. button_to_popup_window
2. link_to_popup_window
3. print_single_button
4. print_spacer
5. print_file_picture (deprecated)
6. print_user_picture
7. print_png (deprecated)
8. helpbutton
9. doclink
10. print_paging_bar
11. notice_yesno
2009-07-27 10:33:00 +00:00
nicolasconnault
6a92312848
MDL-19840 Upgraded code of HTML-parsing assertions
2009-07-22 04:21:13 +00:00
nicolasconnault
5daf5d3589
MDL-19840 Fixed a bug in regex delimiter quoting
2009-07-16 03:21:19 +00:00
tjhunt
fa98e6d15a
Kill some debug code.
2009-06-25 06:56:41 +00:00
tjhunt
8954245a1b
themes: MDL-19077 start implementing moodle_core_renderer
...
Only a couple of methods implemented. Please review the API and
tell me if you are not happy with the direction I am taking.
2009-06-23 10:41:22 +00:00
samhemelryk
b37eac91cc
lib MDL-19236 Added boilerplates and copyrights
2009-05-26 03:57:03 +00:00
tjhunt
c39a460735
simpletestlib: Fix typo in error message
2009-04-20 06:47:01 +00:00
tjhunt
3efb762e6b
simpletestlib: improve failure message from CheckSpecifiedFieldsExpectation
2009-04-10 09:32:53 +00:00
tjhunt
7fa95ef177
simpletestlib: Fix typo in error message
2009-04-03 08:38:30 +00:00
tjhunt
240be1d71c
DB unit tests: improve the class so it is easier to use.
2009-03-30 07:05:29 +00:00
tjhunt
82701e2443
switch roles: MDL-18132 separate database table role_allow_switch instead of re-using role_allow_assign.
...
This is part 1 that does the back-end:
1. New table role_allow_switch.
2. Upgrade that copies all the allows from role_allow_assign, and then drops the old CFG->allowuserswitchrolestheycantassign.
3. Old function get_assignable_roles_for_switchrole renamed to get_switchable_roles and changed to use the new table. Fixes MDL-18604 in HEAD.
4. Switch callers to use the new function name.
5. Unit tests for this new function.
6. To make those unit tests work, new switch_global_user_id and revert_global_user_id methods in UnitTestCaseUsingDatabase for toggling $USER->id.
I still need to do the editing interface under Administration ► Users ► Permissions ► Define roles. That will be done as a second commit.
2009-03-23 08:15:21 +00:00
tjhunt
f68cb08bbe
unit tests: MDL-18607 new way to do unit tests involving the database.
...
This is not as ambitious as the abortive FakeDBUnitTests scheme, but this one works for simple cases.
There is a new test case class UnitTestCaseUsingDatabase to inherit from. I hope it is sufficiently well documented in its PHPdocs.
* It users $CFG->unittestprefix.
* You can access that database using $this->testdb.
* That database is empty by default, you have to call create_test_table to create the ones you want, and drop_test_table to clean them up in the end. The table definitions are read from the XMLDB file.
* When you are ready to call real Moodle code that users $DB, call switch_to_test_db and then revert_to_real_db when you are done.
* If you forget to call drop_test_table or switch_to_test_db, the class will attempt to clean up after you, but will also print rude developer debug messages telling you not to be stupid.
* There is also a load_test_data method for populating a table from an array.
The is an example of its use in lib/simpletest/testunittestusingdb.php.
2009-03-23 04:12:37 +00:00
tjhunt
2e710be856
Unit tests: in recurseFolders, skip files/folders whose names begnis with '.'/
2009-03-10 07:53:42 +00:00
skodak
3f57bd454a
MDL-14992 towards new moodle db sessions
2009-01-14 17:08:29 +00:00
skodak
84ebf08dcc
MDL-16483 $CFG->unittestprefix not required anymore to run unit tests that do not need fake db; it should be saer to let admins modify the prefix in config.php instead of modifying it from php
2009-01-10 16:06:53 +00:00
skodak
58fa5d6f75
MDL-16483 - renamed MoodleUnitTestCase to FakeDBUnitTestCase; MDL-17841 removed bogus remove lib/simpletest/slowcodetest.php
2009-01-10 13:47:26 +00:00
tjhunt
3169d49c84
unit tests: MDL-17803 test Db instatiate being called from two places, which was overwriting the reference to the real DB.
2009-01-07 08:59:13 +00:00
tjhunt
821e4ecf16
unit tests: MDL-17646 Helper functions for loading and cleaning up test data.
2008-12-15 02:39:55 +00:00
skodak
beaa43db85
MDL-17036 dml: dbpersist moved into dboptions
2008-10-27 22:21:34 +00:00
mjollnir_
915d745f2c
tiny simpletest fix: start and end output buffering a bit more sensibly.
2008-10-13 10:17:01 +00:00
nicolasconnault
747f4a4ce6
MDL-16486 Flushing output buffer between each test, and fixed problem with update/delete of course_categories and context_temp
2008-09-23 05:11:35 +00:00
nicolasconnault
274e2947a2
MDL-16486 Only using one test $DB connection. Completed most of the implementation. Tests working well now.
2008-09-22 07:06:08 +00:00
nicolasconnault
5d1381c2c3
MDL-16486 Implemented the proxy DB class. Sort of working, but still some issues to sort out, like fix_course_sort_order, which updates a record NOT inserted by the unit test.
2008-09-19 14:28:22 +00:00
nicolasconnault
cb352449ef
MDL-16486 Correctly overriding $DB at construct time.
2008-09-18 15:26:38 +00:00
nicolasconnault
90997d6d6d
MDL-16486 changed unittest_prefix to unittestprefix
2008-09-18 10:05:20 +00:00
nicolasconnault
294c7286c3
MDL-15666 MDL-16486
2008-09-17 14:41:16 +00:00
nicolasconnault
c7d306e168
MDL-15666 MDL-16486
2008-09-17 14:31:30 +00:00
nicolasconnault
356e001031
MDL-16483 minor fixes
2008-09-16 16:40:15 +00:00
nicolasconnault
b9c639d6c2
MDL-16483 Refactored install/upgrade code into lib/adminlib. Created an intermediate MoodleUnitTestCase class that overrides simpletest's constructor, destructor and setup/teardown methods. All moodle unit tests must extend this class.
2008-09-16 12:19:43 +00:00
skodak
245ac55791
MDL-14679 last forgotten bits of dml conversion
2008-06-09 19:48:24 +00:00
stronk7
56768525ac
Merged from MOODLE_19_STABLE. Adding $Id tag
2007-10-12 09:45:33 +00:00
nicolasconnault
761447651e
Minor changes related to unit testing
2007-10-11 09:15:57 +00:00
skodak
03cedd6283
MDL-11432 eliminated majority of RecordCount uses, added several missing rs_close() - this should help improve perf on some platforms - Eloy says ;-)
2007-10-10 12:19:27 +00:00
nicolasconnault
a205dcdc09
Upgraded weblib::format_string() so it accepts unicode htmlentities. Also added more unit tests, including a stub for an integration web-based test.
2007-03-06 05:05:45 +00:00
nicolasconnault
4309bd17dd
Manually merged from MOODLE_18_STABLE
2007-03-01 02:35:13 +00:00
stronk7
bb48a53735
Some more uses of $CFG->dbfamily. MDL-7061
2007-01-13 00:09:02 +00:00
nfreear
22a3b7ccef
Fixes bug MDL-6478 "Unit tests (not) working.."
2006-09-07 09:11:55 +00:00
tjhunt
3ef8c9362d
Bug #5979 - Check in the OU's unit testing framework. Docs at http://docs.moodle.org/en/Unit_tests
2006-06-30 14:59:05 +00:00