Eloy Lafuente (stronk7)
3a5641cb74
MDL-67673 phpunit: Remove deprecated assertEquals() params
...
The optional parameters of assertEquals() and assertNotEquals()
are deprecated in PHPUnit 8 (to be removed in PHPUnit 9):
- delta => use assertEqualsWithDelta()
- canonicalize => use assertEqualsCanonicalizing()
- ignoreCase => use assertEqualsIgnoringCase
- maxDepth => removed without replacement.
More info @ https://github.com/sebastianbergmann/phpunit/issues/3341
Initial search done with:
ag 'assert(Not)?Equals\(.*,.*,' --php
Then, running tests and fixing remaining cases.
2020-10-21 12:46:00 +02:00
Eloy Lafuente (stronk7)
f6711bb394
MDL-67673 phpunit: Fix the return type of template methods
...
All the setup/teardown/pre/post/conditions template methods
now are required to return void. This was warned with phpunit 7
and now is enforced.
At the same time, fix a few wrong function names,
provider data and param types, return statements...
2020-10-21 12:45:59 +02:00
Eloy Lafuente (stronk7)
d584d34967
MDL-67886 phpunit: Make tests cross-db
...
The suggested SQL in some of the assertions was not cross-db
but db-dependent. Now we just keep that part out from the
assertions, because it's not important to verify the
errors that are being asserted.
2020-04-23 13:03:03 +02:00
Mark Nelson
47f3fa131a
MDL-67886 core: check_database_schema() checks for extra indexes
2020-04-23 00:45:43 +02:00
Mark Nelson
a8c38ce85b
MDL-67886 core: check_database_schema() checks for missing indexes
2020-04-22 23:22:18 +02:00
Shamim Rezaie
94e25092b2
MDL-58584 core_ddl: delete te loft over table in the test
2020-02-04 23:15:32 +11:00
Shamim Rezaie
934c2ee1b6
MDL-58584 core_ddl: getDropTableSQL should not do more than what it says
2020-02-03 15:07:15 +11:00
Tim Hunt
5abc431335
MDL-63020 ddl: fix nullable unique indexes in OCI and MS SQL
...
This works-around the default non-standard behaviour of these DB engines.
2018-09-20 17:41:22 +01:00
Tim Hunt
54b2b1d27f
MDL-63020 xmldb: Improve PHPdoc comments for better IDE autocomplete
2018-09-20 17:41:22 +01:00
Matteo Scaramuccia
211d04f43e
MDL-63319 ddl: Added getRenameFieldSQL() coverage
2018-09-14 22:41:18 +02:00
Matteo Scaramuccia
66c34d3578
MDL-63319 ddl: Improved rename_field() coverage
...
DB API should allow to rename fields, including renaming
those columns named using a reserved word.
2018-09-14 22:41:18 +02:00
David Mudrák
7cdb4266e0
MDL-32113 xmldb: Fix and extend unit tests for XMLDB_TYPE_NUMBER
...
These tests describe the new behaviour of the XMLDB_TYPE_NUMBER fields.
2017-12-21 19:48:04 +01:00
Matteo Scaramuccia
596f4e6a23
MDL-59635 ddl: Added test_get_enc_quoted().
2017-09-04 11:46:54 +02:00
Eric Merrill
cd729dc905
MDL-58593 database: More efficiently track issued key names
2017-04-13 12:21:13 -04:00
Adrian Greeve
8c1288dbdb
MDL-48228 database: Unit test addition and update.
2017-03-01 09:03:12 +08:00
Russell Smith
848d212e7a
MDL-53495 database xmldb: Ensure field tests use constant.
...
Some tests were still using hard coded values which break
if the constants are changed.
2016-07-06 14:45:00 +10:00
Russell Smith
0b768e744f
MDL-53495 database xmldb: Use real length restriction.
2016-06-08 11:06:16 +10:00
Damyon Wiese
112632ed58
Merge branch 'wip_MDL-46235_m28_innodbtext' of https://github.com/skodak/moodle
2014-08-26 12:28:47 +08:00
Petr Skoda
a45d54b8cb
MDL-46235 ddl: add support for large number of text fields in one database table
2014-08-25 12:40:57 +12:00
Eloy Lafuente (stronk7)
52953ff948
MDL-46918 ddl: cover behavior with unit test
2014-08-21 18:33:23 +01:00
Rajesh Taneja
a9950b49c4
MDL-46327 phpunit: drop_table should be used, rather then drop_temp_table
2014-08-19 17:16:55 +08:00
Rajesh Taneja
c1dc3f4793
MDL-46327 phpunit: Fixed oracle fail
2014-08-19 10:11:20 +08:00
Petr Skoda
b86912431e
MDL-45945 mssql: force default database collation in all tables including temp table
2014-07-04 15:04:50 +12:00
Petr Škoda
5d4c82560b
MDL-44191 hack around MySQL 5.6 inability to lower auto_increment
2014-03-14 11:31:43 +08:00
Russell Smith
8343b340c4
MDL-39725 database: Include stats collections in unit tests
2013-12-10 20:32:56 +11:00
Dan Poltawski
d06d812c51
Merge branch 'wip-MDL-40883-master' of git://github.com/marinaglancy/moodle
2013-11-08 15:32:11 +08:00
Marina Glancy
a9d11e3cd0
MDL-40883 ddl: unittest for objects name length
2013-11-08 13:17:47 +11:00
Ankit Agarwal
e3359b87df
MDL-41586 libraries: Fix scale issues
...
The default value of scale should be null not false in mssql, that is the
standard with other DBs
0 is a valid value for scale, don't change it in oracle
2013-11-06 16:12:15 +08:00
Petr Škoda
d5ded4e72d
MDL-41022 cleanup core_ddl_testcase
2013-08-24 16:14:25 +02:00
Petr Škoda
8252b7c291
MDL-40901 standardise core test case class and file names
...
This finally allows us to type only the class name when executing individual core test cases.
2013-08-04 22:10:31 +02:00
Petr Škoda
02e5f81c94
MDL-38972 detect key-index duplicates
2013-04-18 20:21:02 +02:00
Petr Škoda
76f2fcdedb
MDL-37726 stop using PREVIOUS/NEXT in install.xml files
2013-01-29 22:32:24 +01:00
Dan Poltawski
0e35ba6ffc
MDL-36357 cleanup - remove double semicolons
2012-11-15 09:51:26 +08:00
Petr Škoda
a3b6e311b8
MDL-35479 some more debugging assert cleanup
2012-09-17 12:06:24 +02:00
Petr Škoda
d9ba3c4ebc
MDL-35479 fix ddl tests to use debugging asserts
2012-09-17 11:41:38 +02:00
Petr Škoda
068cf0e519
MDL-33018 support varchar_pattern_ops on unique indexes
2012-07-06 08:19:55 +02:00
Petr Skoda
bd991d03cf
MDL-33018 add general index type hints and use PostgreSQL varchar_pattern_ops index type for context.path
...
This significantly improves performance of accesslib queries,
credit for the discovery of this solution goes to Andrew Masterton from OU.
2012-07-06 08:19:39 +02:00
Petr Skoda
a6d9d4efc2
MDL-32003 fix PHP4-isms in core xmldb code
2012-06-17 22:56:29 +02:00
Petr Skoda
5a070f0477
MDL-32003 fix phpdocs in DDL layer
2012-06-17 22:56:28 +02:00
Petr Skoda
4ca04fb58b
MDL-32569 remove remaining references to simpletest and improve events test
2012-04-21 17:08:30 +02:00
Petr Skoda
a66b2ae4f4
MDL-32434 deprecate drop_temp_table() in favour of drop_table()
2012-04-15 12:23:15 +02:00
Petr Skoda
9b3323b8be
MDL-32434 allow database_manager->drop_table() for temporary tables
2012-04-13 16:58:17 +02:00
Eloy Lafuente (stronk7)
7823af0994
MDL-32323 tests: check both deletion with truncate and with delete
2012-04-12 00:13:38 +02:00
Petr Skoda
4787e466d6
MDL-32323 make sure DDL libs are loaded before starting function db tests
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
1cbf2a20ca
MDL-32149 setUp() and tearDown() are supposed to be 'protected', add missing blog testcase
2012-04-03 22:30:56 +02:00
Petr Skoda
a3d5830a0a
MDL-32149 PHPUnit test support - part 2
...
Includes:
* constants refactoring
* reworked db table init
* support for $CFG->debug = -1
* functional DB tests
* fixed $DB->get_indexes() to not throw exceptions when table does not exist
* fix handling of user passwords in test db
* add debug info to exception messages
* removed unnecessary PHP debug errors from mathslib
* fixed @error suppression in get_string
* fixed PHPUnit error handler setup
* added timezone info to default install
2012-04-03 22:30:53 +02:00