Commit Graph

174 Commits

Author SHA1 Message Date
Dan Poltawski acbaec594e Revert "MDL-45605 Phpunit: Do not call gc_collect_cycles as part of reset."
This reverts commit c0f29f18d7.
2014-05-21 18:20:26 +08:00
Dan Poltawski 5f901117a8 Revert "MDL-45606 Unit test fix for MySQL and added a comment about the removed code."
This reverts commit 0f18f3fa6f.
2014-05-21 18:20:18 +08:00
Damyon Wiese 0f18f3fa6f MDL-45606 Unit test fix for MySQL and added a comment about the removed code. 2014-05-20 18:09:44 +08:00
Damyon Wiese c0f29f18d7 MDL-45605 Phpunit: Do not call gc_collect_cycles as part of reset.
This takes 25% of the time in running tests and there is no benefit. The
behaviour of destructors is the same before/after the patch.

Conflicts:
	lib/phpunit/classes/util.php
2014-05-19 10:40:32 +08:00
Petr Skoda 7d4eb8991f MDL-45287 fix behat database reset between scenarios
We cannot find out if DB received any writes because behat
web access runs in different request.

This was affecting only scenarios without generators.
2014-04-28 17:14:09 +08:00
Petr Škoda e06ec0459f MDL-44339 treat unexpected debugging() calls in phpunit tests as errors 2014-03-14 11:47:31 +08:00
Eloy Lafuente (stronk7) 96555937ad MDL-43266 testing: avoid assoc arrays for json
Last commit switched from raw arrays to associative
arrays. That leads to json_encode() to generate an
object instead of an array, ultimately leading to
problems with the rest of code expecting an array.

By using array_values() we are moving back to the
non-associative array.

Also, fix some file permissions.
2014-03-13 22:15:16 +01:00
Jerome Mouneyrac f411652f78 MDL-43266 Testing sites are cleaning all test dataroot contents 2014-02-25 14:49:14 +08:00
David Monllao 7a9abcb675 MDL-43461 testing: Avoid switching to .bat files when running MinGW
MinGW can not execute .bat files (http://sourceforge.net/p/mingw/bugs/1902)
so we should not switch to .bat files when running MinGW.
2014-01-14 13:15:46 +08:00
David Monllao 378d11db3e MDL-42842 testing: Generalization of the site info 2013-11-20 13:50:05 +08:00
Sam Hemelryk b45f2c01c6 Merge branch 'MDL-41228_25' of https://github.com/totara/openbadges into MOODLE_25_STABLE 2013-10-01 13:37:29 +13:00
Yuliya Bozhko 5dffc067da MDL-41228 phpunit: Reset message processors list in unit tests 2013-09-03 17:39:18 +12:00
Andrew Nicols 6e8edc5af0 MDL-41196 Unit Tests: Add a phpmailer message sink 2013-08-18 16:15:58 +01:00
Jamie Pratt 161d67d8df MDL-40388 Reset globals after each unit test 2013-07-09 11:56:04 +08:00
Petr Škoda 71fc50031d MDL-38989 detect changed timeout in tests
The trouble is that PHPUnit should ideally test mostly low level libraries that should not change the timeouts.
2013-04-10 09:48:57 +02:00
Petr Škoda 70faad655a MDL-38912 fix incorrect timeout reset 2013-04-10 00:06:34 +02:00
Tim Hunt 82081c1f7d MDL-38912 prevent time-outs during unit tests. 2013-04-05 18:37:25 +01:00
Eloy Lafuente (stronk7) 45679e3a9e Merge branch 'w13_MDL-38589_m25_pear' of git://github.com/skodak/moodle 2013-03-26 23:14:24 +01:00
Eloy Lafuente (stronk7) e01812b333 Merge branch 'w13_MDL-37783_m12_testinfo' of git://github.com/skodak/moodle 2013-03-26 23:13:33 +01:00
Petr Škoda fe95fb5322 MDL-37782 reset DB after each failed database test 2013-03-24 14:16:28 +01:00
Petr Škoda 15bac12e9d MDL-37783 add some useful information to any phpunit output 2013-03-23 00:06:39 +01:00
Petr Škoda de8056c871 MDL-38589 improve missing PHPUnit library hint 2013-03-22 22:47:08 +01:00
Marina Glancy 73a0f3ba76 MDL-33774 Reset filters caches between unit tests 2013-02-14 19:46:19 +11:00
Simon Coggins ec2d8ceb88 MDL-35332 lib: Improve security of hashed passwords 2013-02-09 06:47:57 +13:00
Petr Škoda 774d1d2429 MDL-37780 make sure there are no windows line endings in test files 2013-01-30 21:23:29 +01:00
Petr Škoda a07c89c632 MDL-37713 let phpunit bootstrap create test dataroot if necessary 2013-01-26 14:59:27 +01:00
Eloy Lafuente (stronk7) fa669c49ad Merge branch 'w03_MDL-36411_m25_setup' of git://github.com/skodak/moodle 2013-01-21 20:08:12 +01:00
Dan Poltawski 77ea8340de Merge branch 'MDL-37458_master' of git://github.com/dmonllao/moodle 2013-01-21 11:14:38 +08:00
Dan Poltawski 73ce4ac996 Merge branch 'MDL-37457_master' of git://github.com/dmonllao/moodle 2013-01-21 10:53:12 +08:00
Petr Škoda 6a8e467916 MDL-36411 make sure asserts in setUp() do not cause problems 2013-01-19 13:19:49 +01:00
David Monllao 0ea35584ae MDL-37458 testing common methods generalization 2013-01-18 09:17:30 +08:00
David Monllao f822840223 MDL-37458 testing tests finder externalization 2013-01-17 15:15:27 +08:00
Sam Hemelryk e17dbeeb1a MDL-34398 groups: implemented caching of group information. 2013-01-17 09:24:58 +13:00
Eloy Lafuente (stronk7) c6523d2f94 MDL-37555 Apply realpath() 2 CFG->phpunit_dataroot 2013-01-16 16:15:56 +01:00
David Monllao 3f7211f45a MDL-37458 testing lock externalization 2013-01-16 13:43:25 +08:00
David Monllao 6b21986911 MDL-37457 testing Mark current classes as deprecated 2013-01-15 11:07:45 +08:00
David Monllao 5c3c2c81be MDL-37457 testing Refactoring references 2013-01-15 11:07:43 +08:00
David Monllao f16e1af28e MDL-36457 testing Relocating classes 2013-01-11 14:08:50 +08:00
Petr Škoda 32772035e1 MDL-36936 require phpunit as composer --dev only 2012-12-07 18:20:03 +01:00
Aparup Banerjee 020e338dee Merge branch 'w47_MDL-36701_m24_composer' of git://github.com/skodak/moodle 2012-11-22 16:23:20 +08:00
Petr Škoda 07c6fa6ee4 MDL-36701 add composer to phpunit readme
Thanks Aparup for reminding me!
2012-11-22 07:30:11 +01:00
Dan Poltawski 1b01909597 Merge branch 'w47_MDL-36547_m24_sectiongen' of git://github.com/skodak/moodle 2012-11-21 15:26:15 +08:00
Petr Škoda 3a7bc16ad7 MDL-36701 support for PHPUnit installation via Composer packaging system
See http://getcomposer.org/doc/00-intro.md
2012-11-20 11:27:35 +01:00
Petr Škoda 4f5789eae8 MDL-36703 very basic support for enrolments in data generator 2012-11-19 23:15:29 +01:00
Petr Škoda 46453565f3 MDL-36547 do not use modinfo when creating new modules, improve coding style 2012-11-17 09:05:29 +01:00
Petr Škoda b4126b0c8b MDL-36547 add test for section number when generating modules 2012-11-17 09:05:29 +01:00
David Mudrák dc11af1903 MDL-35238 Add support for explicit singleton reset
This may be needed during PHPUnit testing.
2012-11-08 22:33:08 +01:00
Petr Škoda 9854743221 MDL-36199 reset plugin manager singletons 2012-10-25 00:55:10 +08:00
Dan Poltawski f186ad1f90 Merge branch 'wip-MDL-35339-master' of git://github.com/marinaglancy/moodle 2012-10-15 17:19:44 +08:00
Dan Poltawski 348be850c9 Merge branch 'w42_MDL-35854_m24_usergenerator' of git://github.com/skodak/moodle 2012-10-15 16:03:53 +08:00