Commit Graph

1521 Commits

Author SHA1 Message Date
Ruslan Kabalin
324a45833a MDL-50887 tests: Increment number of plugins in core_component_testcase.
We have got one more core plugin now.
2016-02-29 09:31:30 +00:00
Ruslan Kabalin
ae3ba48272 MDL-50887 antivirus: Add unit tests for manager class.
To run just this test, use:
vendor/bin/phpunit core_antivirus_testcase lib/tests/antivirus_test.php
2016-02-29 09:31:29 +00:00
Andrew Nicols
0346323cec MDL-30811 output: Add support for session notifications 2016-02-29 09:05:56 +08:00
David Monllao
f900b2b6c9 MDL-31989 component: Allow classes to be retrieved by namespace 2016-02-23 10:47:58 +00:00
Andrew Nicols
ec1b9de1b0 Merge branch 'wip-mdl-52970' of https://github.com/rajeshtaneja/moodle 2016-02-22 15:20:34 +08:00
Rajesh Taneja
fee2cde5b6 MDL-52970 behat: Navigation step improvement
If navigation node to expand is a link then first
click on it and navigate to next page where it is
expanded, and then click on link within. This is
needed as some drivers click on link and don't open
the navigation node which are links
2016-02-19 15:21:52 +08:00
Rajesh Taneja
1ebda3eb8c MDL-50484 lib_formslib: Persistant input should have different id
Persistant input is appended for frozen elements
and should have different id then the actual element
2016-02-19 14:00:04 +08:00
Dan Poltawski
33fa0e1181 Merge branch 'MDL-53012-master' of https://github.com/sammarshallou/moodle 2016-02-16 10:44:57 +00:00
Eloy Lafuente (stronk7)
1405f010b7 MDL-51580 upgradelib: Delete stuff used by removed upgrade steps
This commits removes stuff from different upgradelib files, used
exclusively by the already deleted upgrade steps. Given such
exclusivity it was not needed to proceed with a 2-phase deprecation
as far as the functions were 100% internal to upgrade.

This is the list of deleted functions, all them docummented in their
corresponding upgrade.txt files:

- repository_picasa_admin_upgrade_notification();
- repository_googledocs_admin_upgrade_notification();
- repository_boxnet_admin_upgrade_notification();
- repository_alfresco_admin_security_key_notice();
- qtype_essay_convert_to_html();
- portfolio_picasa_admin_upgrade_notification();
- portfolio_googledocs_admin_upgrade_notification();
- portfolio_boxnet_admin_upgrade_notification();
- mod_book_migrate_moddata_dir_to_legacy();
- mod_book_migrate_all_areas();
- mod_book_migrate_area();
- mod_assignment_pending_upgrades_notification();
- upgrade_mysql_fix_unsigned_and_lob_columns();
- upgrade_course_completion_remove_duplicates();
- upgrade_save_orphaned_questions();
- upgrade_rename_old_backup_files_using_shortname();
- upgrade_mssql_nvarcharmax();
- upgrade_mssql_varbinarymax();
- upgrade_fix_missing_root_folders();
- upgrade_course_modules_sequences();
- upgrade_grade_item_fix_sortorder();
- upgrade_availability_item();
2016-02-15 18:38:21 +01:00
sam marshall
a4ce565f20 MDL-53012 Behat: Add step to run scheduled task 2016-02-15 17:24:15 +00:00
Brendan Heywood
eca8cf67dc MDL-52818 core: Added CFG->divertallemailsexcept config option
When $CFG->divertallemailsto is specified, this allows a list of email
or domain exceptions to be whitelisted enabling easier testing by groups
of testers who don't share a single email address.
2016-02-09 09:59:20 +00:00
David Monllao
7a662077f1 Merge branch 'MDL-51723-master' of git://github.com/andrewnicols/moodle 2016-02-08 09:02:41 +08:00
David Monllao
367cf39985 Merge branch 'MDL-52873-master-modgradeid' of git://github.com/mudrd8mz/moodle 2016-02-02 12:12:03 +08:00
Dan Poltawski
b0e7075214 Merge branch 'wip-mdl-52932-m' of https://github.com/rajeshtaneja/moodle 2016-02-01 10:27:28 +00:00
Andrew Nicols
abedeb8c70 MDL-51723 ldap: Normalise the user objectclass 2016-02-01 10:24:34 +08:00
Mark Johnson
a2497e5036 MDL-52913 behat: Abort database transactions on exception. 2016-01-29 11:54:56 +00:00
Rajesh Taneja
5e48383330 MDL-52932 behat: Restart session if it fails because of some reason 2016-01-29 11:59:01 +08:00
John Okely
a057ba5924 MDL-35590 navigation: Remove link from admin node if you have javascript
Also:
* In behat, ensure nav node exists before checking attribute (Credit to
  Rajesh Taneja)
* Remove some unused JS constants
* Fix debugging notice for users without settings block
2016-01-29 11:28:08 +08:00
Rajesh Taneja
80f37f2739 MDL-35590 behat: Data-loaded is on li node 2016-01-29 10:15:25 +08:00
Eloy Lafuente (stronk7)
6e38f41d8e MDL-52567 Core: amend existing test to new counting rules 2016-01-29 10:15:24 +08:00
David Monllao
6c3def94fa Merge branch 'MDL-35590-master' of git://github.com/lameze/moodle 2016-01-29 10:15:15 +08:00
David Mudrák
d84c64b7d6 MDL-52873 forms: Generate unique id attributes for modgrade elements
The previous method of generating the id attribute of the elements
within the modgrade group did not take the name of the modgrade field
into account. So if there were multiple fields of the modgrade type
added into a form (not a common case yet still valid), elements created
within the group were assigned same id attributes.

The patch introduces a new method for generating the id attribute of
modgrade elements. The new method takes the name of the modgrade group
into account and returns the id in the format similar to the default one
returned by HTML_QuickForm_element::_generateId().

The patch changes the generated id attribute. Apart from the
block_activity_results' behat feature files, not other places seem to
rely on the exact value.
2016-01-22 14:24:53 +01:00
Rajesh Taneja
10ac8baf6e MDL-35590 behat: Fixed navigation steps to support aria attributes 2016-01-22 17:53:44 +08:00
David Monllao
20ff2fba25 MDL-48621 events: Adapting unit tests to debugging messages
- A new assertDebuggingCalledCount has been introduced, as multiple debugging messages
  may be called in some cases, for example when calling events_cron with queued events
  that need to be dispatched.
- events_update_definition has been moved out of setUp as debugging messages are only
  caught by our phpunit custom stuff when they are called inside tests.
2016-01-19 15:19:10 +08:00
Marina Glancy
b355a1c97c MDL-50851 core_question: use new tag API 2016-01-10 15:25:47 +08:00
Mark Nelson
be5e0110ff MDL-49566 core: used reflection in unit tests
Also split the tests into multiple functions for each scenario.
2015-12-29 17:42:43 +08:00
Ankit Agarwal
bef0d6b052 MDL-49566 core: Write unittests for MDL-45898 2015-12-29 11:22:42 +08:00
David Monllao
a49fd98349 MDL-52226 tests: Fix behat phpunit naming conflict 2015-12-21 16:27:23 +08:00
David Monllao
f08d1590c8 Merge branch 'MDL-52226-master' of git://github.com/sammarshallou/moodle 2015-12-21 14:41:21 +08:00
Dan Poltawski
e42b60351e Merge branch 'MDL-52487_master' of git://github.com/dmonllao/moodle 2015-12-14 09:23:03 +00:00
David Monllao
abc4e1efed MDL-52487 rss: PHP 7 compatible error supression
PHP5 used to update error_reporting to 0 on functions called with the
suppress errors operator (@). In PHP7 it is not updated.

Credit to Rajesh Taneja.
2015-12-14 15:28:37 +08:00
David Monllao
05178f0745 Merge branch 'MDL-52471-master' of git://github.com/danpoltawski/moodle 2015-12-11 11:52:02 +08:00
Dan Poltawski
ef5df7b721 MDL-52471 tests: simplify setup code
Test code was not using the generator for simple enrollments, couldn't
help to fix when noticed.
2015-12-10 15:47:11 +00:00
Dan Poltawski
194a02e409 MDL-52471 completion: fix deprecated use of 'object'
And add a unit test covering completion_can_view_data() without
full course object passed.
2015-12-10 15:47:11 +00:00
Dan Poltawski
9708ff95fd MDL-52471 setuplib: depreciate class object properly
Previously was marked depricated but not throwwing debugging
2015-12-10 14:26:30 +00:00
David Monllao
a4fb992435 Merge branch 'MDL-52335-master' of git://github.com/marinaglancy/moodle 2015-12-10 15:47:14 +08:00
sam marshall
6d4858d5b3 MDL-52226 Forms: max_input_vars problems with advanced checkbox 2015-12-09 12:15:45 +00:00
Eloy Lafuente (stronk7)
7955476cab Merge branch 'MDL-51483_master' of https://github.com/jinhofer/moodle 2015-12-09 01:09:08 +01:00
jinhofer
4ebdd15487 MDL-51483 lib/moodlelib.php: Added conditional checks to shorten_text 2015-12-03 10:00:08 -06:00
Dan Poltawski
50901a53bc Merge branch 'MDL-51664-master' of git://github.com/FMCorz/moodle 2015-12-03 11:16:30 +01:00
Dan Poltawski
0ad66dda0e Merge branch 'MDL-52292' of git://github.com/timhunt/moodle 2015-12-03 11:13:26 +01:00
Marina Glancy
83bef8dabb MDL-52335 tool_uploaduser: php7 compatibility in variable syntax 2015-12-03 09:31:25 +08:00
Tim Hunt
eb3884e48f MDL-52292 block testing generators: improve the API
* Refactor the block generator base class, to remove the amount
  of duplication required in base classes.

* Change the defaults that are filled in to be a little more natural.

* Make the Behat step 'Given the following "block" exist:' work.
2015-12-01 13:48:08 +00:00
Dan Poltawski
8fea53a0b1 Merge branch 'MDL-51718-set-scheme' of https://github.com/brendanheywood/moodle 2015-11-30 13:37:47 +00:00
Dan Poltawski
14248189b7 Merge branch 'wip-mdl-50163' of https://github.com/rajeshtaneja/moodle 2015-11-23 11:33:55 +00:00
David Mudrák
182d9990f1 MDL-52214 core: Fix the is_web_crawler() regression
In MDL-50891, the is_web_crawler() was refactored into a core_useragent
method and the function itself was deprecated. However, there were no
unit tests kept to check the backwards compatible behaviour. It turned
out that the deprecated function leads to PHP fatal error due to a typo.

This patch fixes the typo and brings back the previous unit tests. To be
able to explicitly check the raised debugging message, the test case
now must be subclass of advanced_testcase.

Additionally fixes missing info about the function being deprecated.
2015-11-23 09:44:13 +01:00
Rajesh Taneja
8f76de32d9 MDL-50163 behat: Return subcontext from session
Creating a new context with new mink context
with different session was keeping the session
and was not returning proper session information
2015-11-17 13:27:10 +08:00
rajesh Taneja
131d4ac2b0 MDL-50163 behat: Restart session after scenario with switch_window
Restart session after a scenario with switch window
is finished. This will close all open browser windows
and open a new browser window
2015-11-17 12:12:03 +08:00
Dan Poltawski
2759c1218d Merge branch 'MDL-52036-master-resettable' of git://github.com/mudrd8mz/moodle 2015-11-05 09:03:20 +00:00
Brendan Heywood
462065e822 MDL-51718 weblib: Allow moodle_url scheme to be set 2015-11-05 09:08:00 +11:00