Commit Graph

113 Commits

Author SHA1 Message Date
Russell Smith 0a97a2e574 MDL-55143 unittests: Check the db rather than cache for version hash. 2016-10-18 09:53:24 +11:00
Rajesh Taneja 643b907d2f MDL-55764 behat: Reset static update db list
While running multiple suites we should
ensure static cli cache is also reset.
2016-08-30 08:01:24 +08:00
Rajesh Taneja f7a8bc6378 MDL-46514 behat: Delete tablesupdatedbyscenario before suite
Delete tablesupdatedbyscenario before db reset to ensure
db is fully reset. In case user exits or process terminated
then the file will be left and can lead to wrong results
2016-08-23 15:19:29 +08:00
Rajesh Taneja b62061f44a MDL-55174 core_testing: Use proper directory separator
While searching for existing files if directory
separator is not correct then original files
and directories will be deleted. So use DIRECTORY_SEPARATOR.
2016-07-15 13:53:10 +08:00
Rajesh Taneja 13708875d3 MDL-54573 testing: don't uppercase dbtype 2016-05-17 17:16:12 +08:00
Dan Poltawski fc3d70d798 MDL-54573 testing: don't uppercase dbtype 2016-05-16 08:25:10 +01:00
Dan Poltawski f6cbdf788a MDL-54573 testing: use dbtype rather dbvendor for diagnostics
So that we can differentiate between drivers
2016-05-13 14:49:42 +01:00
Simey Lameze ac9768fc1b MDL-52781 core_user: replace direct PARAM_ usages.
This commit replace as much as possible of clean_param and PARAM_ usages related to user object.
Also few unit tests has been changed to match the new validation
2016-04-21 15:24:36 +08:00
Rajesh Taneja e891c8381e MDL-52502 behat: Ensure php web and cli version is same 2016-04-05 11:46:44 +08:00
Rajesh Taneja af2dc48b41 MDL-52502 phpunit: Add php, db and os deatils 2016-04-05 11:46:43 +08:00
Nadav Kavalerchik dffcf46f43 MDL-52252 Tags: Add tags to modules (Resources and Activities) 2016-03-09 14:19:47 +08:00
Marina Glancy e11d7380c2 MDL-51283 core_tag: change tagtype to isstandard
Change 'official' to 'standard' in UI
2016-02-02 17:31:14 +08:00
David Monllao 0e5458f45f Merge branch 'wip-mdl-52799' of git://github.com/rajeshtaneja/moodle 2016-01-29 10:15:16 +08:00
Rajesh Taneja 31ed36f193 MDL-52721 behat: Exclude links in moodle while finding tests
Parallel run create links within moodle
so avoid searching for tests within links
2016-01-19 14:35:18 +00:00
Rajesh Taneja 28dab6408c MDL-52799 unittest: Removed empty if statement 2016-01-18 15:47:07 +08:00
Rajesh Taneja 1226f3ca33 MDL-52799 phpunit: Truncate records for brokedmysql not empty. 2016-01-18 14:10:18 +08:00
Rajesh Taneja 60237c2ce2 MDL-52721 unittest: Exclude tests in vendor and node_modules 2016-01-18 10:25:02 +08:00
Marina Glancy c026a28d59 MDL-50851 core_tag: introduce tag collections 2016-01-10 15:25:43 +08:00
Andrew Nicols 3dc5cdf543 Merge branch 'MDL-52060-master-arn' of https://github.com/andrewnicols/moodle 2015-12-23 09:08:48 +08:00
Rajesh Taneja e487a51db3 MDL-52060 phpunit: Keep track of modified database for reset
Keep list of modified tables, so they can be reset
without any guess work
2015-12-22 15:37:40 +08:00
Rajesh Taneja 22d55b3950 MDL-52060 phpunit: Check file only if needed 2015-12-22 13:19:06 +08:00
Rajesh Taneja 44121fbdc9 MDL-52060 phpunit: Keep track of initial reset sequence 2015-12-22 13:19:06 +08:00
sam marshall 92cce140ed MDL-52558 Data generator: enrol_user should allow shortname 2015-12-18 11:01:15 +00:00
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