Commit graph

455 commits

Author SHA1 Message Date
Damyon Wiese
34e46d7556 Merge branch 'mdl-39335' of git://github.com/vostreltsov/moodle 2013-04-30 15:51:12 +08:00
Dan Poltawski
e0b3f5f235 Merge branch 'w17_MDL-39077_m25_sizes' of git://github.com/skodak/moodle 2013-04-30 08:24:31 +01:00
Sam Hemelryk
45d9752205 MDL-39216 url: updated tests to show desired outcome 2013-04-30 11:09:47 +12:00
Sam Hemelryk
616396a6cf MDL-39216 url: new moodle_url tests for valueless params 2013-04-30 11:09:47 +12:00
Petr Škoda
f869cb2326 MDL-39077 add more unit tests for get_max_upload_sizes() 2013-04-27 16:08:15 +02:00
Tim Hunt
328ac3069b MDL-39378 Improve s() performance.
These changes give about a 10% speed-up in this function. The significant changes are:
1. Simplify the if logic to remove unnecssary cases.
2. Dont pass default argument values to htmlspecialchars, just using the
   defaults is faster.
3. I can confirm that /i regex is faster than the equivalent regex without the i.

I also added more unit tests to test the edge cases.
2013-04-26 18:49:25 +01:00
Tim Hunt
0c6f9e759b MDL-39378 s(): fix bad hex regex 2013-04-26 18:38:29 +01:00
Valeriy Streltsov
1977123ea5 MDL-39335: add an ord() unicode analog to textlib. 2013-04-26 12:12:03 +00:00
Eloy Lafuente (stronk7)
274511f0cb Merge branch 'MDL-35364' of git://github.com/timhunt/moodle 2013-04-24 23:35:46 +02:00
Eloy Lafuente (stronk7)
bdeda339b4 Merge branch 'wip-MDL-38441-m25' of git://github.com/samhemelryk/moodle 2013-04-23 23:41:47 +02:00
Tim Hunt
4a7cc24808 MDL-35364 shorten text: don't return invalid HTML.
I also broke the unit tests into more, smaller, named tests, so that
when things start failing, more tests are run, and it is clearer what
the problem is.

In a couple of cases, I adjusted the $ideal lenght in the test. A
careful counting of the characters in the test input (added as comments)
suggests that the new values make for better tests.
2013-04-22 19:21:40 +01:00
David Mudrák
badf464792 MDL-39148 Non-installed plugins cannot be uninstalled
If the plugin has been only deployed to the disk without installing into
the database, do not allow going through the uninstallation procedure.
Not only it does not have much sense. But it can also lead to some
tricky situation due to dependencies. Better to block it and wait till
the plugin is either fully installed or removed from the disk.
2013-04-19 11:24:43 +02:00
Sam Hemelryk
0678958015 MDL-38411 css: new unit tests to cover chunking 2013-04-19 10:09:45 +12:00
Dan Poltawski
c6101ef441 Merge branch 'MDL-39087-plugins-uninstall' of git://github.com/mudrd8mz/moodle 2013-04-17 12:09:20 +01:00
David Mudrák
ccc6c15fd2 MDL-39087 Fix plugin_manager::can_uninstall_plugin() implementation
There was a false positive result for subplugin required by other
subplugin. See the unit test.
2013-04-12 03:23:47 +02:00
David Mudrák
73658371eb MDL-39087 Simplify get_uninstall_url() interpretation
The get_uninstall_url() method of all subclasses of plugininfo_base
class is now expected to always return moodle_url. Subclasses can use
the new method is_uninstall_allowed() to control the availability of the
'Uninstall' link at the Plugins overview page (previously they would do
it by get_uninstall_url() returning null). By default, URL to a new
general plugin uninstall tool is returned. Unless the plugin type needs
extra steps that can't be handled by plugininfo_xxx::uninstall() method
or xmldb_xxx_uninstall() function, this default URL should satisfy all
plugin types.

The overall logic is implemented in plugin_manager::can_install_plugin()
that respects the plugininfo class decision and vetoes it in certain
cases (typically when plugin or its subplugin is required by some other
plugin).
2013-04-12 01:44:35 +02:00
David Mudrák
d7d48b4091 MDL-39087 Add new helper methods to the plugin_manager API
These are mainly intended for callers that had to iterate over
get_plugins() result manually.
2013-04-12 01:44:34 +02:00
David Mudrák
86a862cdc2 MDL-39087 Add missing unit tests for the plugin_manager
This patch improves and adds unit tests for the plugin_manager class.
These unit tests cover the existing functionalities. Tests for the
new features related directly with MDL-38259 will be added in a separate
commit (to make it clear what's related to it).
2013-04-12 01:42:58 +02:00
Eloy Lafuente (stronk7)
2f587fb334 Merge branch 'MDL-38828_master' of git://github.com/dmonllao/moodle 2013-04-11 16:44:47 +02:00
David Monllao
1303eb290f MDL-38958 behat: Step definitions to interact with popup windows 2013-04-11 13:58:11 +08:00
Petr Škoda
0ddd65d9e0 MDL-38989 add missing test timeout reset 2013-04-10 09:49:19 +02:00
Dan Poltawski
0bedc806f9 Merge branch 'MDL-38999' of git://github.com/stronk7/moodle 2013-04-10 10:35:40 +08:00
Eloy Lafuente (stronk7)
696facb159 Merge branch 'MDL-38952_master' of git://github.com/dmonllao/moodle 2013-04-09 23:30:30 +02:00
Dan Poltawski
5331215459 Merge branch 'MDL-39005' of git://github.com/stronk7/moodle 2013-04-09 13:49:09 +08:00
Eloy Lafuente (stronk7)
de0fc867ad Merge branch 'w14_MDL-34222_m25_simplepie131' of git://github.com/skodak/moodle 2013-04-09 01:24:08 +02:00
Eloy Lafuente (stronk7)
5a0443cc14 Merge branch 'MDL-39023-parentlang' of git://github.com/mudrd8mz/moodle 2013-04-08 16:57:38 +02:00
Eloy Lafuente (stronk7)
d506f422c9 MDL-38999 timezones: add some TZ/stamps know to be problematic to tests. 2013-04-08 16:09:41 +02:00
David Mudrák
b7acd9be50 MDL-39023 Make get_language_dependencies() aware of circular dependency risk
The patch reimplements the core_string_manager::get_language_dependencies()
so that potentially mis-configured language packs with circular
dependencies or self dependency do not make the site unavailable.
Unit tests for the expected behaviour are added.
2013-04-08 14:31:27 +02:00
David Monllao
e6d18d9d00 MDL-38952 behat: Adding no-JS compatibility
This step is widely used by JS scenarios,
with Javascript disabled this step fails tests
as tree nodes al already expanded; we can
reuse JS scenarios for no-JS tests skiping
this step in no-JS mode.
2013-04-08 12:24:23 +08:00
David Monllao
f9d3667e7b MDL-38179 behat: Step definition to click on a table row element 2013-04-08 10:07:21 +08:00
Eloy Lafuente (stronk7)
6b7df0b5d1 MDL-39005 unittest: add the upgradelib test template. 2013-04-07 17:47:16 +02:00
Petr Škoda
d958e6bd70 MDL-34222 import simplepie 1.3.1 2013-04-07 15:35:27 +02:00
Eloy Lafuente (stronk7)
577173a51f Merge branch 'MDL-38897-master' of git://github.com/danpoltawski/moodle 2013-04-05 03:21:52 +02:00
Dan Poltawski
b7d20148a1 MDL-38897 formslib: add unit tests for setType debugging 2013-04-04 14:59:21 +08:00
David Monllao
b82e0c17fb MDL-38691 behat: Fixing behat tests 2013-04-04 13:52:24 +08:00
Eloy Lafuente (stronk7)
6b117438b9 Merge branch 'MDL-38482_master' of git://github.com/dmonllao/moodle 2013-04-03 16:48:42 +02:00
Eloy Lafuente (stronk7)
57902e2738 Merge branch 'MDL-38619_master' of git://github.com/dmonllao/moodle 2013-04-03 13:33:16 +02:00
David Monllao
d2eca4cd0f MDL-38482 behat: Data generator for system assigns
Chaning also the adapt_ prefix for non-direct
data generator uses to process_ because not all
of behat's data generators would have a lib/testing
data generator to share with phpunit tests.
2013-04-03 10:09:18 +08:00
David Monllao
a8a4849518 MDL-38482 behat: Allow frontpage course role assigns
There are no enrolment plugins at frontpage
course level.
2013-04-03 09:43:10 +08:00
Damyon Wiese
594d66c27e MDL-38840 Statslib - Fix failing unit tests on ci server (DST change) 2013-04-02 16:47:04 +02:00
Dan Poltawski
15c2b2c43a Merge branch 'MDL-26956' of git://github.com/timhunt/moodle 2013-04-02 19:49:02 +08:00
David Monllao
c8619f33e1 MDL-38828 behat: Moving init before purge_cache 2013-04-02 11:24:00 +08:00
Eloy Lafuente (stronk7)
a5efbe6161 Merge branch 'MDL-38814_master' of git://github.com/dmonllao/moodle 2013-04-02 03:30:30 +02:00
Eloy Lafuente (stronk7)
51cae58998 Merge branch 'MDL-38689_master' of git://github.com/dmonllao/moodle 2013-04-02 02:41:44 +02:00
Eloy Lafuente (stronk7)
3e27548431 Merge branch 'MDL-38620_master' of git://github.com/dmonllao/moodle 2013-04-02 02:26:54 +02:00
Eloy Lafuente (stronk7)
62eb5c466e MDL-38547 behat: coding style fixes. 2013-04-01 22:40:50 +02:00
Eloy Lafuente (stronk7)
54e48dc32d Merge branch 'MDL-38547_master' of git://github.com/dmonllao/moodle 2013-04-01 22:32:06 +02:00
Eloy Lafuente (stronk7)
0251a62500 Merge branch 'MDL-38486_master' of git://github.com/dmonllao/moodle 2013-04-01 22:17:12 +02:00
Eloy Lafuente (stronk7)
68adfee6d4 Merge branch 'MDL-38788_master' of git://github.com/dmonllao/moodle 2013-04-01 13:17:20 +02:00
David Monllao
5bc64b0fab MDL-38814 behat: Deleting old files 2013-04-01 12:22:43 +08:00