Commit graph

2323 commits

Author SHA1 Message Date
Simey Lameze
2ee6e02e21 MDL-61410 question: unit tests for question_sort_tags 2018-03-19 11:45:55 +08:00
Martin Gauk
c4172077df MDL-61519 calendar: do not iterate through all categories
Replace calls to \coursecat::get_all() or cache the results.
2018-03-16 14:30:55 +00:00
Andrew Nicols
d7ff2fc28b Merge branch 'MDL-60398-master' of git://github.com/mihailges/moodle 2018-03-14 10:33:03 +08:00
Shamim Rezaie
15f80bf579 MDL-61615 Questions: unit test for question_delete_course_category 2018-03-13 18:30:51 +11:00
Eloy Lafuente (stronk7)
bad062a992 Merge branch 'MDL-61619-master' of https://github.com/snake/moodle 2018-03-12 16:46:29 +01:00
Jake Dallimore
0c23f4e6b6 MDL-61619 phpunit: phpunit test confirming bug in new xmlize code 2018-03-12 11:11:58 +08:00
Andrew Nicols
431a3bb674 MDL-61307 core: Add component_class_callback functionality 2018-03-09 10:01:18 +08:00
Andrew Nicols
dcc16e155d MDL-61307 core: Define a new privacy component 2018-03-09 09:59:36 +08:00
Jake Dallimore
8525d8466a MDL-38829 core: fix whitespace in xmlize test 2018-03-08 11:39:42 +08:00
Jake Dallimore
f9628f871a Merge branch 'MDL-38829-master' of git://github.com/andrewnicols/moodle 2018-03-08 11:17:05 +08:00
Ryan Wyllie
79c9ad6277 MDL-61363 question: unit tests for question tags context change 2018-03-07 10:31:47 +08:00
Ryan Wyllie
dd69ecb630 MDL-61363 question: unit tests for course context tagging 2018-03-07 10:31:47 +08:00
Andrew Nicols
79e4395888 MDL-38829 core: Rewrite xmlize unit tests
These changes adjust the unit tests to compare known values rather than
calculating them on the fly.

The unit test against a 'bad' source has been modified to simply check
for the relevant exception as PHP prevents any output on exceptions
anyway.
2018-03-07 09:40:11 +08:00
Andrew Nicols
475d4345f9 Merge branch 'MDL-61380-master' of git://github.com/rezaies/moodle 2018-03-07 09:00:15 +08:00
Kilian
533a7edeae MDL-38829 core: Unit test for xmlize using two sample xml files.
The file sample_questions.xml from moodle-stack is properly formed.
The file sample_questions_wrong.xml has mismatching tags.
Comparison is performed with recursive array comparison.
Error messages and returned data structures are compared.
Call with: phpunit lib/tests/xmlize_test.php
2018-03-06 15:36:14 +08:00
Andrew Nicols
03d174d733 MDL-61268 core: Fix empty string DB cehck
(amended by stronk7 to use the helper better)
2018-03-02 16:31:11 +01:00
Adrian Greeve
8a844437bf MDL-61268 blocks: Unit tests for deprecated object update.
Unit tests for testing that the upgrade functions to change
the now deprecated object to stdClass works.
2018-03-02 09:22:05 +08:00
Shamim Rezaie
4fa49cc647 MDL-61380 Quiz: Adding a random question 2018-03-01 11:50:52 +11:00
Mihail Geshoski
757a889b24 MDL-60398 resource: Unable to download folder resource 2018-02-26 16:49:21 +08:00
Cameron Ball
eadebb2445
MDL-61394 core_scss: Add unit tests for SassC compilation
This patch also adds a test in theme_boost to verify that boost
can be succesfully compiled without errors by SassC.
2018-02-19 14:46:00 +08:00
Shamim Rezaie
869320c7f4 MDL-61132 Questions: Unit tests compatibility
Modified unit tests to adapt with "Top" categories.
2018-02-05 11:58:58 +11:00
David Monllao
f372f96656 Merge branch 'MDL-60997-master' of git://github.com/junpataleta/moodle 2018-02-01 10:33:16 +08:00
Jun Pataleta
558a6a79d6 MDL-60997 core_message: Add replytoname in unit test 2018-01-25 16:47:12 +08:00
Andrew Nicols
0cc0f72ceb MDL-60078 behat: Convert ErrorException to DriverException 2018-01-22 11:29:29 +08:00
Andrew Nicols
60ce5848f6 Merge branch 'MDL-60078-master' of https://github.com/nashtechdev01/moodle 2018-01-22 11:08:19 +08:00
KietLy
26872a8006 MDL-60078 User tours accessibility: Tab should go back into the pop-up 2018-01-16 17:36:25 +07:00
Andrew Nicols
174fbacc9b Merge branch 'MDL-60815-master' of git://github.com/ryanwyllie/moodle 2018-01-16 12:27:43 +08:00
Ryan Wyllie
bb8bb8e41c MDL-60815 theme: fix loading editor styles 2018-01-16 03:39:09 +00:00
sam marshall
470d59d31f MDL-61063 Scheduled tasks: Add link to clear fail delay 2018-01-12 11:10:29 +00:00
Cameron Ball
4cca0082df MDL-61143 core_files: Update unit tests for curl_security_helper
Previously some of the unit tests were passing "by accident" becuase
we had the security helper letting through domains where the DNS lookup
failed. That behaviour has changed and now such domains are blocked.

Additionally tests for domains with multiple A records and weird Unicode
stuff have been added.

This patch also mocks the DNS resolution in the test, rather than actually
resolving the domain.
2018-01-09 16:54:32 +08:00
Eloy Lafuente (stronk7)
bb3e956ed9 Merge branch 'MDL-60966-master' of https://github.com/snake/moodle 2017-12-27 17:54:58 +01:00
David Monllao
3410ff644f Merge branch 'MDL-60942-master' of git://github.com/ryanwyllie/moodle 2017-12-27 17:54:54 +01:00
Ryan Wyllie
0377e78e36 MDL-60966 external: contexts can be passed to external format funcs 2017-12-22 13:10:39 +08:00
Jun Pataleta
a8dffa2d03 Merge branch 'MDL-50666-master' of https://github.com/junpataleta/moodle 2017-12-20 12:49:28 +13:00
Andrew Hancox
64cd459648 MDL-50666 core: Rename allow_ACTION to core_role_set_ACTION_allowed 2017-12-19 13:53:23 +13:00
Andrew Hancox
a63cd3e2ca MDL-50666 core: Add function get_viewable_roles to set role visibility 2017-12-19 13:53:23 +13:00
Eloy Lafuente (stronk7)
6663f615ed Merge branch 'wip-MDL-60161-master-test' of git://github.com/abgreeve/moodle 2017-12-18 16:09:51 +01:00
Adrian Greeve
c86189ae02 MDL-52100 filelib: Update to unit tests for maxbytes. 2017-12-18 13:12:22 +08:00
Adrian Greeve
01957f1a69 MDL-60161 filelib: Unit test for duplicate curl headers. 2017-12-13 11:07:58 +08:00
Damyon Wiese
a34a305d53 Merge branch 'MDL-44660-master' of https://github.com/lucaboesch/moodle 2017-12-12 12:49:46 +08:00
Luca Bösch
970dc511e2 MDL-44660 grade: Typos @package core_grade instead of core_grades 2017-12-08 14:21:34 +01:00
Tim Hunt
91c8d8b130 MDL-60983 get_user_capability_course: fix buggy edge cases
There were basically two problems, which are demostrated by
the new test users u7 and u8 in the unit test.

1. There was a problem if a role was overridden in a context above the
one where it was assigned. E.g. User has teacher role in a course, and
there is a role override in the course-category context. That was being
ignored.

2. Problems with the handling of PROHIBITs. It should be the case that
if there is a PROHIBIT in force, then it cannot be overridden by another
role, or by a role override. However, this was not working in all cases.

Also, I had to add comments to the unit test so that I could understand
it. Hopefully these will be hepful to other developers too.
2017-12-07 18:28:18 +00:00
Ryan Wyllie
748545858c MDL-60942 filters: include filter in format_string cache key 2017-12-01 06:49:24 +00:00
David Monllao
b78d40e637 Merge branch 'MDL-60526-master' of git://github.com/damyon/moodle 2017-11-20 13:43:54 +01:00
Neill Magill
7251472c83 MDL-60436 blocks: Unit test for dashboard block positioning 2017-11-17 14:40:30 +00:00
Damyon Wiese
fda2fa2680 MDL-60526 forms: Prevent duplicate type attributes
The exporter for mform elements does not skip "type" (which is included as a separate value).
2017-11-15 11:53:56 +08:00
Eloy Lafuente (stronk7)
796e48a58b MDL-60611 phpunit: remove deprecated stuff and other minor fixes
Thanks @scara for MDL-60611 phpunit: improved redis skipping reasons
2017-11-05 01:45:04 +01:00
Eloy Lafuente (stronk7)
801a372dad MDL-60611 phpunit: switch to namespaced phunit classes 2017-11-02 23:45:34 +01:00
Jake Dallimore
141c4adbb6 Merge branch 'MDL-42834_master' of git://github.com/markn86/moodle 2017-10-23 13:25:35 +08:00
John Okely
672f483670 MDL-42834 admin: Removal of httpswwwroot 2017-10-23 12:25:36 +08:00