23 Commits

Author SHA1 Message Date
Andrew Nicols
a3cc26f8bb MDL-76583 core: Update uses of external_* classes 2023-01-19 07:34:09 +08:00
Eloy Lafuente (stronk7)
100bc51f1d MDL-73485 phpunit: externallib, generator and filter tescase names
All externallib_test, generator_test and filter_test classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to tests under testing/tests:

1) The core_testing component doesn't exist.
2) But testing/tests are allowed because there is a suite pointing to it (phpunit.xml).
3) So, the only possible namespace for them is "core".
4) And to avoid problems with other core testcases (under lib/tests)
   they have been renamed to have testing_xxxx as prefix.

Finally, also modified calendar/tests/events/events_test.php because it uses
some renamed (core_calendar_externallib_testcase => \core_calendar\externallib_test)
classes.
2022-01-21 19:48:23 +01:00
Sara Arjona
3f2f2e85bb MDL-72115 course: Rename Miscellaneous category
The "Miscellaneous" course category has been renamed to Category 1.
Besides, the description field has been set from FORMAT_MOODLE to
FORMAT_HTML.
2021-09-13 08:36:17 +02:00
Juan Leyva
7f02879ce7 MDL-70387 files: New WS core_files_get_unused_draft_itemid 2021-01-13 13:01:40 +01:00
Juan Leyva
94a0ee41e7 MDL-69776 files: New WS core_files_delete_draft_files 2020-09-25 10:37:16 +02:00
Eloy Lafuente (stronk7)
55946a892a MDL-54901 phpunit: Change phpunit wwwroot to HTTPS and fix tests
This includes:

- Changing PHPUnit's bootstrap to use https://www...
- Modify all existing expectations to the new wwwroot.
- Amend some tests now with different defaults because of is_https()
- Added a note to main upgrade.php about the change.
2017-04-18 03:40:17 +02:00
Marina Glancy
308ce5b46f MDL-55827 tests: @ does not suppress wrong number of arguments in php7.1 2016-09-06 15:37:30 +08:00
Rajesh Taneja
52f3e060e4
MDL-55091 phpunit: Following has been deprecated.
1. getMock()
2. setExpectedException()
3. checkForUnintentionallyCoveredCode renamed to beStrictAboutCoversAnnotation
4. beStrictAboutTestSize renamed to enforceTimeLimit
5. UnitTestCase class is now fully removed.
2016-07-26 10:11:30 +08:00
Cameron Ball
f23e9b6ba4 MDL-49414 webservices: Remove deprecated functions 2016-04-27 15:54:38 +08:00
Rajesh Taneja
0fe86bbdbb MDL-49799 behat: replaced asd.com with example.com
asd.com is a valid domain, we should use reserved domain names for testing
2015-04-20 11:21:20 +08:00
Juan Leyva
b78010975f MDL-45131 files: Add validation for returned parameters in WS tests 2015-04-16 10:25:32 +02:00
Juan Leyva
7310dcff41 MDL-30239 webservices: Return additional fields in ws get_files 2015-02-05 14:20:24 +01:00
Russell Smith
42e34c2882 MDL-43926 files: Unit tests cannot assume id values. 2014-02-06 09:34:56 +08:00
Russell Smith
74b63eae76 MDL-43440 unit testing: Use cmid in unit tests when it should be used.
instance is has been used instead of cmid.  This works as all id's are 1
in most cases, but not always.

accesslib_clear_all_caches_for_unit_testing was updated to clear the
$USER->access cache which would fail test when the wrong user's data was used.
2014-01-25 08:57:32 +11:00
Adrian Greeve
9c3bfea0da MDL-41419 - unit tests: Fixed up sporadic test failures in externallib_test.php.
Also added much needed comments to the unit test.
2013-08-27 10:40:08 +08:00
Damyon Wiese
3d262be88d MDL-40038 files: Removed commented code from unit test 2013-08-20 15:52:11 +08:00
Damyon Wiese
57cef30e42 Merge branch 'wip-MDL-40038-master' of git://github.com/abgreeve/moodle
Conflicts:
	files/tests/externallib_test.php
2013-08-20 15:51:57 +08:00
Adrian Greeve
196c8b71f1 MDL-40038 - web services: Added unit tests for core_files_external::get_files(). 2013-08-15 15:28:38 +08:00
Damyon Wiese
873482fe9b MDL-22236 webservice upload files: Update unit tests 2013-08-12 10:38:30 +08: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
Ankit Agarwal
71e38b128e MDL-40039 phpunit: Test core_files_external::upload() without the new params 2013-07-04 13:26:07 +08:00
Ankit Agarwal
57d16acd74 MDL-40039 webservices: Add support for alternate to contextid parameter to core_files_external::upload() 2013-06-28 10:51:01 +08:00
Ankit Agarwal
11f20be783 MDL-40250 phpunit: Add unit tests for core_files_external::upload() 2013-06-21 11:32:02 +08:00