Andrew Nicols
504c97925c
MDL-47449 phpunit: Add comparitor for isEqual with exceptions
...
We often do isEqual tests but where a field, may have a single exception.
Ordinarily we can handle this easily by breaking the test down, but when
dealing with mocked objects we can only pass an instance of a
PHPUnit_Framework_Constraint, or a single value (which is cast to an
instance of PHPUnit_Framework_Constraint_IsEqual).
To deal with instances of time-based exception, we need to be able to
compare simple objects and classes where one or two values may be
different.
2015-08-14 10:53:19 +08:00
Tony Levi
b80b35d0fc
MDL-50926 phpunit: Upgrade to phpunit 4.x
2015-08-11 02:35:11 +02:00
Petr Škoda
54f1423ecc
MDL-44510 support PHPUnit 4.x
...
The old style PEAR installation is incompatible with PHPUnit 4,
nobody was supposed to use PEAR any more - composer
is the only supported library installation method now.
2014-03-20 17:30:42 +08:00
Andrew Nicols
1aba6b2b4d
MDL-41196 Unit Tests: Add a phpmailer message sink
2013-08-15 13:58:51 +01:00
Frederic Massart
d6277b0ca0
MDL-40997 phpunit: Assertions for events legacy data
2013-08-02 18:30:02 +08:00
Petr Škoda
62401e8fd5
MDL-39846 implement event sink for unit testing
2013-07-19 08:43:29 +02: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
David Monllao
3f7211f45a
MDL-37458 testing lock externalization
2013-01-16 13:43:25 +08:00
Petr Škoda
4c9e03f0ac
MDL-36031 implement message redirection for unit testing
2012-10-13 20:00:54 +02:00
Petr Skoda
bd672f7830
MDL-33436 include phpunit printer file from our lib.php
...
The problem is that the phpunit.xml does not support relative links.
2012-06-02 21:48:26 +02:00
Petr Skoda
7e7cfe7a03
MDL-32960 refactor phpunit integration to one class per file structure
2012-05-12 20:53:48 +02:00
Tim Hunt
667c090728
MDL-32924 improve unit test performance.
2012-05-10 16:22:09 +01:00
Eloy Lafuente (stronk7)
f171c37dda
Merge branch 'w18_MDL-32697_m23_oci' of git://github.com/skodak/moodle
2012-05-03 12:22:22 +02:00
Petr Skoda
8d741d4dfc
MDL-32697 use current database sequences instead of global scope
...
Credit goes to Eloy, thanks!
2012-05-03 10:52:19 +02:00
Petr Skoda
62f9a5c4b6
MDL-32587 fix --buildcomponentconfigs compatibility with Windows
2012-05-03 09:34:35 +02:00
Petr Skoda
a090587234
MDL-32697 improve MySQL and Oracle test reset performance
2012-05-01 14:35:23 +02:00
Petr Skoda
8e5c963e6b
MDL-32587 improve component phpunit config building and make the util.php help fit 80char screens
2012-04-27 13:42:18 +02:00
Eloy Lafuente (stronk7)
cb48174266
MDL-32587 phpunit: new option to create distributed phpunit.xml files
2012-04-27 13:42:17 +02:00
Dan Poltawski
f488088109
Merge branch 'w17_MDL-32569_m23_phpunit5' of git://github.com/skodak/moodle
2012-04-23 11:21:06 +08:00
Petr Skoda
bc5c10f69e
MDL-32575 import latest Typo3 libs for textlib and other improvements
...
Includes new textlib reset, new test for faulty integer lower/upper casing.
2012-04-21 21:31:03 +02:00
Petr Skoda
6e9f0fd15d
MDL-32569 improve SimpleTest emulation
2012-04-20 22:20:43 +02:00
Petr Skoda
322cf28415
MDL-32400 fix PHPUnit configuration file paths on windows
2012-04-15 12:23:42 +02:00
Petr Skoda
0d8e51a65f
MDL-32400 rework phpunit exit codes, use only php based init
2012-04-15 12:23:42 +02:00
Petr Skoda
589376d385
MDL-32400 ignore outdated config settings in future upgrades
2012-04-15 12:23:41 +02:00
Petr Skoda
e2b8630b5c
MDL-32400 store version hash also in database
...
This prevents problems when switching databases in config.php and keeping the same test dataroot.
2012-04-15 12:23:41 +02:00
Petr Skoda
5a798e7eac
MDL-32323 improve SQL Server test reset performance
2012-04-11 23:21:05 +02:00
Petr Skoda
c691274bf9
MDL-32323 use new loadDataSet in mod_data and fix typos in last commit
2012-04-10 21:07:56 +02:00
Petr Skoda
e396e8ed5f
MDL-32323 implement data set loader support in advanced_testcase
2012-04-10 20:58:27 +02:00
Petr Skoda
d2999716aa
MDL-32323 all our base test case classes should be abstract
2012-04-10 19:03:24 +02:00
Petr Skoda
39e2e9c41f
MDL-32323 prevent modification of our heavily modified runBare() methods
...
This should help with compatibility of future PHPUnit and it also allows us to improve test reset without breaking existing moodle test cases.
2012-04-10 15:27:14 +02:00
Petr Skoda
920f4efe51
MDL-32323 improve inline docs
2012-04-10 15:27:14 +02:00
Petr Skoda
95dcf96559
MDL-32323 allow mocking of global $DB
2012-04-10 15:27:13 +02:00
Petr Skoda
ce9f3beb53
MDL-32323 automate transaction handling in test reset
2012-04-10 15:27:13 +02:00
Petr Skoda
713d20918f
MDL-32323 reset state after failed test
2012-04-10 15:27:12 +02:00
Petr Skoda
c06563c845
MDL-32323 do not pollution config-dist.php with settings that only DML driver devs use
2012-04-10 15:27:10 +02:00
Petr Skoda
7620602cc2
MDL-32323 improve transaction handling in PHPUnit test cases
2012-04-10 15:27:10 +02:00
Petr Skoda
de3d1590ee
MDL-32323 fix PHPUnit diag regression
2012-04-10 15:27:09 +02:00
Petr Skoda
b6b8a19316
MDL-32323 improve PHPUnit related diagnotic messages
2012-04-10 15:27:08 +02:00
Petr Skoda
e10736b3cc
MDL-32323 improve mysql test reset performance
2012-04-10 15:27:08 +02:00
Petr Skoda
e370154157
MDL-32323 make test locking win compatible
2012-04-10 15:27:08 +02:00
Petr Skoda
6c583c75f9
MDL-32323 do lot try to acquire lock before dataroot init
2012-04-10 15:27:07 +02:00
Petr Skoda
812013b1c1
MDL-32323 reset event handlers in phpunit test reset
2012-04-10 15:27:06 +02:00
Petr Skoda
a0c5affee6
MDL-32323 test detection of changes and improve coding style
2012-04-10 15:27:05 +02:00
Petr Skoda
ab483c0a07
MDL-32323 use auto_increment instead of primary_key for sequence detection and improve coding style
2012-04-10 15:27:05 +02:00
Petr Skoda
219d1a4e72
MDL-32323 improve self-diagnostic messages
2012-04-10 15:27:05 +02:00
Petr Skoda
8b5413ccf2
MDL-32323 rework db reset once more, now with tests
2012-04-10 15:27:05 +02:00
Petr Skoda
50be93d1d7
MDL-32323 add fast transaction based database reset for PostgreSQL
2012-04-10 15:27:04 +02:00
Petr Skoda
714f3998a8
MDL-32323 rework buggy database reset optimisation and fix blog tests
2012-04-10 15:27:04 +02:00
Petr Skoda
0b9251e330
MDL-32323 cache structure of all tables and reset sequences only in table where id is primary key
2012-04-10 15:27:04 +02:00