15 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
0d80f6984b Merge branch 'MDL-56250-32-formvalidation' of https://github.com/roperto/moodle 2016-10-25 20:23:12 +02:00
Damyon Wiese
e56b58e3c9 MDL-56006 theme: Set Boost as the default theme
Units tests have been adjusted e.g. 'boost' instead of 'clean' in pix urls.

Some places I didn't update the test to reflect the boost markup and reset
the theme to clean. This is because the test was not testing the markup - but the
functionality (e.g. looking for specific structures to indicate an error in a form element).
2016-10-25 10:15:20 +08:00
Daniel Thee Roperto
8b9ca065d8 MDL-56250 forms library: Changed form to validate once per object.
If two instances of moodleforms are validated in the same run, most
likely a phpunit test run, it would store the first validation result.
Now it stores the validation result per instance, not for all instances.
2016-10-21 10:43:03 +11: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
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
Marina Glancy
bf8542ce3a MDL-30358 forms: strict validation is too strict 2014-10-15 11:57:01 +08:00
Eloy Lafuente (stronk7)
61dc1d26cd MDL-40267 forms: added some tests for the range rule 2013-11-05 09:57:46 +08:00
Petr Škoda
78d4a26004 MDL-39915 cleanup core_formslib_testcase 2013-07-27 18:38:34 +02:00
Frederic Massart
188c04b0a8 MDL-39579 form: Type can be set on repeated elements in a group 2013-05-10 12:05:43 +08:00
Frederic Massart
d5909fd144 MDL-38885 form: Fix comments and stricter unit test 2013-05-10 08:34:59 +08:00
Frederic Massart
a85f745d50 MDL-38885 form: Unit tests for data cleaning 2013-05-10 08:17:40 +08:00
Frederic Massart
9654f68ae9 MDL-38885 form: More unit testing for missing type detection 2013-05-10 08:17:40 +08:00
Dan Poltawski
b7d20148a1 MDL-38897 formslib: add unit tests for setType debugging 2013-04-04 14:59:21 +08:00
Eloy Lafuente (stronk7)
f35f07e9f7 MDL-38719 forms: add some missing types.
This just adds some missing types to different places
causing phpunit tests to fail.
2013-03-26 12:13:40 +01: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