90 Commits

Author SHA1 Message Date
Dan Poltawski
551088fcd7 MDL-52292 testing: block generator fix
Stop errors when no $options supplied
2015-12-03 11:13:28 +01: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
Marina Glancy
810805da9e MDL-51636 core_tag: allow setting tags in generators 2015-10-04 22:25:37 +08:00
Andrew Nicols
d78613701c MDL-49841 testing: Correct composer incantation 2015-08-14 10:27:53 +08:00
Marina Glancy
9a7e398664 MDL-50874 block: basic tests for tag-related blocks 2015-07-21 17:02:10 +08:00
David Monllao
54a1ef2655 MDL-50611 testing: Extra http status code checking 2015-06-23 10:34:18 +08:00
Luke Carrier
0897e19093 MDL-50611 test: use cURL extension to download Composer
The curl binary is nowhere near as common in Windows environments as it is
in Linux and Mac ones. In order to encourage more users to adopt Behat and
PHPUnit for their testing, we should avoid introducing unnecessary
hurdles.
2015-06-22 15:50:01 +01:00
Andrew Nicols
69c150cbda MDL-49840 testing: Always call composer install 2015-04-14 11:26:53 +08:00
Rajesh Taneja
3c71c15c26 MDL-39752 behat: Modified following for parallel run:
1. Create behat datadir within behat_dataroot not at same level
2. Define suffix for link and not use hard-coded values
3. Renamed ns_parallel to run.php
4. Rename variables to best understand them
5. Added support for each run to specify db, prefix, rerun and profile.
6. Showing number of steps in each line of parallel run.
2015-03-09 06:52:54 +08:00
Tony Levi
08e7f97ee4 MDL-39752 behat: Parallel execution support 2015-03-09 06:52:54 +08:00
Rajesh Taneja
288eea620a MDL-49081 tests: Removed dev option from composer
dev option is enabled by default in composer, so not required.
https://github.com/composer/composer/blob/master/CHANGELOG.md
2015-02-04 10:19:46 +08:00
Petr Skoda
e5035ecb3f MDL-48420 test: fix lasttnamephonetic typo 2014-12-01 09:25:55 +13:00
Rajesh Taneja
97d0445a7b MDL-48302 behat: Make sure to clear php file cache 2014-11-21 10:22:56 +08:00
Andrew Nicols
3fa0daa90f MDL-47664 phpunit: Do not use sequence number changes for Oracle
When resetting a sequence number, we call change_database_structure()
which in turns clears the MUC cache for databasemeta. This cache contains
information about the table, columns, etc.

After the cache is cleared, it must be re-filled, and it was discovered
that the get_columns() code which fills this cache can take a particularly
long time. Given that this is called for every table in Moodle, this can
add up to a significant period, and this is done on a per-testsuite basis.

On my SSD install this was taking approximately 40 seconds on each re-fill
of the cache.
2014-10-17 13:28:46 +08:00
John Okely
cfa91962d1 MDL-47243 behat: Add data generators for gradeitems scales and outcomes 2014-10-15 14:33:26 +08:00
Damyon Wiese
4a813f3959 Merge branch 'wip-MDL-36014-master' of git://github.com/marinaglancy/moodle
Conflicts:
	lib/db/install.xml
	lib/db/upgrade.php
	version.php
2014-10-07 12:34:34 +08:00
Petr Skoda
ddffa9d6d3 MDL-47538 phpunit: fix invalid PHPUNIT_SEQUENCE_START constant 2014-10-06 17:31:15 +13:00
Marina Glancy
80f98467f8 MDL-36014 cohorts: Allow teachers to view cohorts
Added property 'visible' for cohorts. Unsetting it hides the cohort from users in the course.

AMOS BEGIN
 CPY [visible,core_moodle],[visible,core_cohort]
AMOS END
2014-10-03 18:26:34 +08:00
Marina Glancy
f4f2045a7f MDL-47398 core_grades: fix grade category generator 2014-09-26 09:57:56 +08:00
Damyon Wiese
15ace20460 MDL-46997 Grades: Improve the behat tests for grade aggregation
The tests now cover hidden grades in sub categories for all aggregation types. This change
includes a data generator for grade categories, with unit tests and behat tests for
the generator.
2014-09-09 17:11:59 +08:00
sam marshall
9c85baa8c5 MDL-44725 Availability: Replace groupmembersonly - FEATURE_xx (6)
Remove old FEATURE_GROUPMEMBERSONLY as no longer required.
2014-09-02 13:03:17 +01:00
sam marshall
061e6b2864 MDL-44725 Availability: Replace groupmembersonly - upgrade, core (1)
* Upgrades existing data so that the groupmembersonly option is
  replaced with equivalent data for the new availability API.
* Removes the database field and admin setting used for
  groupmembersonly.
* Changes core modinfo library to remove/deprecate groupmembersonly
  data and functions.
* Changes other core library files to remove groupmembersonly
  references.

Includes deprecation of several functions, listed in lib/upgrade.txt.
2014-09-02 13:03:07 +01:00
Sam Hemelryk
6a91c41a49 Merge branch 'wip-MDL-37812-master' of git://github.com/marinaglancy/moodle 2014-07-15 12:07:05 +12:00
Marina Glancy
9f7379e9b4 MDL-37812 user: apply default values for user preferences when creating user 2014-07-08 12:35:44 +08:00
Russell Smith
529495f7ce MDL-46193 phpunit: Use random starting value on initialization. 2014-07-04 16:33:13 +10:00
Russell Smith
fbb0c914b0 MDL-43835 phpunit: Create unique starting id's for sequences.
When all starting autoincrement ids are the same, it's difficult to detect coding and testing
errors that use the incorrect id in test calls.  The classic case is cmid vs instance id.
To reduce the chance of the coding error we start sequences at different values where possible.

OUBlog installation is the case that highlighted this as it inserts a sitewide course module
at install time and cmid <> instance id in most cases.
2014-06-14 00:29:26 +10:00
Tim Hunt
5bcfd504df MDL-45618 Fix @since PHPdoc tags. 2014-05-19 17:03:04 +01:00
Petr Skoda
a9236a2c3f MDL-45287 fix behat database reset between scenarios
We cannot find out if DB received any writes because behat
web access runs in different request.

This was affecting only scenarios without generators.
2014-04-28 17:02:58 +08:00
sam marshall
8d1f33e122 MDL-44070 Conditional availability enhancements (6): core changes
Changes core code to use new API instead of the old one when
checking user access to activities and sections.

Includes changes to other libraries that are necessary after
adding the availability system and removing old conditional tables
etc.
2014-04-07 20:11:48 +01:00
Gilles-Philippe Leblanc
2d35b7d3d8 MDL-42816 auth_manual: Add password expiry for manual auth method 2014-03-27 10:45:01 -04:00
Mark Nelson
e0c8619823 MDL-44316 test: added function to generate a tag 2014-03-22 13:47:24 -07:00
Petr Škoda
5d4c82560b MDL-44191 hack around MySQL 5.6 inability to lower auto_increment 2014-03-14 11:31:43 +08:00
Eloy Lafuente (stronk7)
630bb85d9e MDL-43266 testing: avoid assoc arrays for json
Last commit switched from raw arrays to associative
arrays. That leads to json_encode() to generate an
object instead of an array, ultimately leading to
problems with the rest of code expecting an array.

By using array_values() we are moving back to the
non-associative array.

Also, fix some file permissions.
2014-03-13 22:11:03 +01:00
Eloy Lafuente (stronk7)
1700bec3c6 Merge branch 'MDL-43266_master-last-fixes' of git://github.com/dmonllao/moodle
Conflicts:
	lib/phpunit/classes/util.php
2014-03-13 19:12:25 +01:00
David Monllao
d3daf24563 MDL-43266 testing: Removing duplicated keys 2014-03-12 17:49:55 +08:00
Jerome Mouneyrac
c78f19d153 MDL-43266 Testing sites are cleaning all test dataroot contents 2014-02-25 14:47:25 +08:00
David Monllao
702851c071 MDL-44108 behat: Adding a roles data generator 2014-02-21 13:25:44 +08:00
David Monllao
ff7139d6cb MDL-43461 testing: Avoid switching to .bat files when running MinGW
MinGW can not execute .bat files (http://sourceforge.net/p/mingw/bugs/1902)
so we should not switch to .bat files when running MinGW.
2014-01-14 13:11:07 +08:00
Petr Skoda
9bb80d2005 MDL-43213 fix init regression and remove $checkphp parameter 2013-12-19 13:11:25 +08:00
Sam Hemelryk
2df83c2ea8 Merge branch 'MDL-43355_master' of git://github.com/dmonllao/moodle 2013-12-18 10:52:41 +13:00
David Monllao
244da9d1f8 MDL-43355 testing: Return the hash when HEAD points to a hash 2013-12-12 17:26:22 +08:00
Dan Poltawski
dfe84ffb52 MDL-37517 testing: remove deprecated classes 2013-12-05 12:05:10 +08:00
David Monllao
7514c2f282 MDL-42842 testing: Generalization of the site info 2013-11-26 10:48:29 +08:00
Frederic Massart
7cb353ff69 MDL-42666 tests: Setting new Box.net mandatory arguments 2013-11-07 13:54:47 +08:00
Marina Glancy
c24b3f66f1 MDL-42400 generator: unittest for module generator 2013-10-26 14:00:27 +11:00
Marina Glancy
b6affde2cb MDL-42400 generator: Add function testing_module_generator::create_content()
also implement it for mod_book and mod_forum to call existing create_page, create_discussion/post functions
2013-10-26 14:00:24 +11:00
Marina Glancy
7fbe33fcf1 MDL-42400 generator: module generators call add_moduleinfo instead of direct inserts 2013-10-26 14:00:23 +11:00
Petr Škoda
401c82d7a7 MDL-41022 cleanup core_test_generator_testcase 2013-08-24 16:18:19 +02:00
Petr Škoda
c5701ce7d4 MDL-41086 rework detection of necessary upgrades 2013-08-08 21:11:40 +02:00
Petr Škoda
528a7b447a MDL-41017 improve purify caching
The improvements include:

* HTMLPurifier cache is stored in localcachedir
* allowobjectembed changes are not ignored any more
* the cache keys include revision and all options which makes
  this suitable for local caches on cluster nodes
* unchanged test is replaced by "true" value which should
  significantly improve performance
* removal of purge_all_caches() hack for directory recreation
* comments and coding style cleanup
2013-08-03 11:31:18 +02:00