From 106801f4bc2b8ba122fe0ce6577dd74cadf765b9 Mon Sep 17 00:00:00 2001
From: Justus Dieckmann <justusdieckmann@wwu.de>
Date: Tue, 10 Nov 2020 17:46:04 +0100
Subject: [PATCH] Travis: Update for Moodle 3.10

---
 .travis.yml                                     | 16 +++++-----------
 tests/active_workflow_is_manual_test.php        |  2 +-
 tests/backup_and_restore_workflow_test.php      |  2 +-
 tests/backup_manager_test.php                   |  2 +-
 tests/manual_trigger_tools_test.php             |  2 +-
 tests/manually_triggered_process_test.php       |  2 +-
 tests/persistence/persist_process_data_test.php |  2 +-
 tests/persistence/persist_process_test.php      |  2 +-
 tests/persistence/persist_step_test.php         |  2 +-
 tests/persistence/persist_workflow_test.php     |  2 +-
 tests/privacy_test.php                          |  2 +-
 tests/process_status_message_test.php           |  2 +-
 tests/settings_manager_test.php                 |  2 +-
 tests/workflow_actions_testcase.php             |  2 +-
 trigger/categories/tests/trigger_test.php       |  2 +-
 trigger/delayedcourses/tests/trigger_test.php   |  2 +-
 trigger/sitecourse/tests/trigger_test.php       |  2 +-
 trigger/startdatedelay/tests/trigger_test.php   |  2 +-
 18 files changed, 22 insertions(+), 28 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 607c80c..1e94b25 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -22,21 +22,20 @@ php:
 env:
   jobs:
     - DB=pgsql MOODLE_BRANCH=MOODLE_35_STABLE
-    - DB=pgsql MOODLE_BRANCH=MOODLE_37_STABLE
     - DB=pgsql MOODLE_BRANCH=MOODLE_38_STABLE
     - DB=pgsql MOODLE_BRANCH=MOODLE_39_STABLE
+    - DB=pgsql MOODLE_BRANCH=MOODLE_310_STABLE
     - DB=pgsql MOODLE_BRANCH=master
     - DB=mysqli MOODLE_BRANCH=MOODLE_35_STABLE
-    - DB=mysqli MOODLE_BRANCH=MOODLE_37_STABLE
     - DB=mysqli MOODLE_BRANCH=MOODLE_38_STABLE
     - DB=mysqli MOODLE_BRANCH=MOODLE_39_STABLE
+    - DB=mysqli MOODLE_BRANCH=MOODLE_310_STABLE
     - DB=mysqli MOODLE_BRANCH=master
 
 before_install:
   - phpenv config-rm xdebug.ini
-  - nvm install 14
   - cd ../..
-  - composer create-project -n --no-dev --prefer-dist blackboard-open-source/moodle-plugin-ci ci dev-master
+  - composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^3
   - export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH"
 
 jobs:
@@ -45,7 +44,7 @@ jobs:
     # Prechecks against latest Moodle stable only.
     - stage: static
       php: 7.4
-      env: DB=mysqli MOODLE_BRANCH=MOODLE_39_STABLE
+      env: DB=mysqli MOODLE_BRANCH=MOODLE_310_STABLE
       install:
         - moodle-plugin-ci install --no-init
       script:
@@ -61,7 +60,7 @@ jobs:
     # Smaller build matrix for development builds
     - stage: develop
       php: 7.4
-      env: DB=mysqli MOODLE_BRANCH=MOODLE_39_STABLE
+      env: DB=mysqli MOODLE_BRANCH=MOODLE_310_STABLE
   exclude:
     - php: 7.3
       env: DB=pgsql MOODLE_BRANCH=MOODLE_35_STABLE
@@ -71,14 +70,9 @@ jobs:
       env: DB=pgsql MOODLE_BRANCH=MOODLE_35_STABLE
     - php: 7.4
       env: DB=mysqli MOODLE_BRANCH=MOODLE_35_STABLE
-    - php: 7.4
-      env: DB=pgsql MOODLE_BRANCH=MOODLE_37_STABLE
-    - php: 7.4
-      env: DB=mysqli MOODLE_BRANCH=MOODLE_37_STABLE
 
 # Unit tests and behat tests against full matrix.
 install:
-  - docker run -d -p 127.0.0.1:4444:4444 --net=host -v /dev/shm:/dev/shm selenium/standalone-firefox:2.53.1
   - moodle-plugin-ci install
 script:
   - moodle-plugin-ci phpunit --coverage-clover
diff --git a/tests/active_workflow_is_manual_test.php b/tests/active_workflow_is_manual_test.php
index 0ae330d..508a91f 100644
--- a/tests/active_workflow_is_manual_test.php
+++ b/tests/active_workflow_is_manual_test.php
@@ -57,7 +57,7 @@ class tool_lifecycle_workflow_is_manual_testcase extends \advanced_testcase {
      * Setup the testcase.
      * @throws coding_exception
      */
-    public function setUp() {
+    public function setUp() : void {
         global $USER;
         $this->resetAfterTest(true);
         $generator = $this->getDataGenerator()->get_plugin_generator('tool_lifecycle');
diff --git a/tests/backup_and_restore_workflow_test.php b/tests/backup_and_restore_workflow_test.php
index ed81356..2e08e1a 100644
--- a/tests/backup_and_restore_workflow_test.php
+++ b/tests/backup_and_restore_workflow_test.php
@@ -56,7 +56,7 @@ class tool_lifecycle_backup_and_restore_workflow_testcase extends \advanced_test
      * Setup the testcase.
      * @throws coding_exception
      */
-    public function setUp() {
+    public function setUp() : void {
         $this->resetAfterTest(true);
         $generator = $this->getDataGenerator()->get_plugin_generator('tool_lifecycle');
         $this->workflow = $generator->create_workflow(['startdatedelay', 'categories'], ['email', 'createbackup', 'deletecourse']);
diff --git a/tests/backup_manager_test.php b/tests/backup_manager_test.php
index 9e9865a..6e09ec2 100644
--- a/tests/backup_manager_test.php
+++ b/tests/backup_manager_test.php
@@ -42,7 +42,7 @@ class tool_lifecycle_backup_manager_testcase extends \advanced_testcase {
     /**
      * Setup the testcase.
      */
-    public function setUp() {
+    public function setUp() : void {
         $this->resetAfterTest(false);
         $this->course = $this->getDataGenerator()->create_course();
     }
diff --git a/tests/manual_trigger_tools_test.php b/tests/manual_trigger_tools_test.php
index 81ba80a..c609dde 100644
--- a/tests/manual_trigger_tools_test.php
+++ b/tests/manual_trigger_tools_test.php
@@ -62,7 +62,7 @@ class tool_lifecycle_manual_trigger_tools_testcase extends \advanced_testcase {
      * Setup the testcase.
      * @throws coding_exception
      */
-    public function setUp() {
+    public function setUp() : void {
         global $USER;
         $this->resetAfterTest(true);
         $generator = $this->getDataGenerator()->get_plugin_generator('tool_lifecycle');
diff --git a/tests/manually_triggered_process_test.php b/tests/manually_triggered_process_test.php
index 5251f40..6e7c4a1 100644
--- a/tests/manually_triggered_process_test.php
+++ b/tests/manually_triggered_process_test.php
@@ -65,7 +65,7 @@ class tool_lifecycle_manually_triggered_process_testcase extends \advanced_testc
      * @throws coding_exception
      * @throws moodle_exception
      */
-    public function setUp() {
+    public function setUp() : void {
         global $USER;
 
         // We do not need a sesskey check in theses tests.
diff --git a/tests/persistence/persist_process_data_test.php b/tests/persistence/persist_process_data_test.php
index 2803171..462d2d9 100644
--- a/tests/persistence/persist_process_data_test.php
+++ b/tests/persistence/persist_process_data_test.php
@@ -54,7 +54,7 @@ class tool_lifecycle_persist_process_data_testcase extends \advanced_testcase {
      * @throws coding_exception
      * @throws dml_exception
      */
-    public function setUp() {
+    public function setUp() : void {
         $this->resetAfterTest(true);
         $generator = $this->getDataGenerator()->get_plugin_generator('tool_lifecycle');
 
diff --git a/tests/persistence/persist_process_test.php b/tests/persistence/persist_process_test.php
index 08a7cfa..cf985dd 100644
--- a/tests/persistence/persist_process_test.php
+++ b/tests/persistence/persist_process_test.php
@@ -50,7 +50,7 @@ class tool_lifecycle_persist_process_testcase extends \advanced_testcase {
      * Setup the testcase.
      * @throws coding_exception
      */
-    public function setUp() {
+    public function setUp() : void {
         $this->resetAfterTest(true);
         $generator = $this->getDataGenerator()->get_plugin_generator('tool_lifecycle');
 
diff --git a/tests/persistence/persist_step_test.php b/tests/persistence/persist_step_test.php
index 0432a67..e87f466 100644
--- a/tests/persistence/persist_step_test.php
+++ b/tests/persistence/persist_step_test.php
@@ -51,7 +51,7 @@ class tool_lifecycle_persist_step_testcase extends \advanced_testcase {
      * @throws coding_exception
      * @throws moodle_exception
      */
-    public function setUp() {
+    public function setUp() : void {
         $this->resetAfterTest(true);
         $this->generator = $this->getDataGenerator()->get_plugin_generator('tool_lifecycle');
 
diff --git a/tests/persistence/persist_workflow_test.php b/tests/persistence/persist_workflow_test.php
index 57dc4c0..a68aae3 100644
--- a/tests/persistence/persist_workflow_test.php
+++ b/tests/persistence/persist_workflow_test.php
@@ -45,7 +45,7 @@ class tool_lifecycle_persist_workflow_testcase extends \advanced_testcase {
     /**
      * Setup the testcase.
      */
-    public function setUp() {
+    public function setUp() : void {
         $this->resetAfterTest(true);
         $record = new stdClass();
         $record->id = null;
diff --git a/tests/privacy_test.php b/tests/privacy_test.php
index 8ffe855..07aada6 100644
--- a/tests/privacy_test.php
+++ b/tests/privacy_test.php
@@ -74,7 +74,7 @@ class tool_lifecycle_privacy_test extends provider_testcase {
      * Setup the testcase.
      * @throws coding_exception
      */
-    public function setUp() {
+    public function setUp() : void {
         global $USER;
 
         // We do not need a sesskey check in theses tests.
diff --git a/tests/process_status_message_test.php b/tests/process_status_message_test.php
index 1a9105c..b7b313f 100644
--- a/tests/process_status_message_test.php
+++ b/tests/process_status_message_test.php
@@ -54,7 +54,7 @@ class tool_lifecycle_process_status_message_testcase extends \advanced_testcase
      * Setup the testcase.
      * @throws coding_exception
      */
-    public function setUp() {
+    public function setUp() : void {
         global $USER;
 
         // We do not need a sesskey check in theses tests.
diff --git a/tests/settings_manager_test.php b/tests/settings_manager_test.php
index 4e5c770..204dd41 100644
--- a/tests/settings_manager_test.php
+++ b/tests/settings_manager_test.php
@@ -59,7 +59,7 @@ class tool_lifecycle_settings_manager_testcase extends \advanced_testcase {
      * Setup the testcase.
      * @throws coding_exception
      */
-    public function setUp() {
+    public function setUp() : void {
         $this->resetAfterTest(false);
         $generator = $this->getDataGenerator()->get_plugin_generator('tool_lifecycle');
 
diff --git a/tests/workflow_actions_testcase.php b/tests/workflow_actions_testcase.php
index cc9ee82..06b8780 100644
--- a/tests/workflow_actions_testcase.php
+++ b/tests/workflow_actions_testcase.php
@@ -50,7 +50,7 @@ abstract class workflow_actions_testcase extends \advanced_testcase {
      * Setup the testcase.
      * @throws coding_exception
      */
-    public function setUp() {
+    public function setUp() : void {
         global $USER;
         // We do not need a sesskey check in theses tests.
         $USER->ignoresesskey = true;
diff --git a/trigger/categories/tests/trigger_test.php b/trigger/categories/tests/trigger_test.php
index 3c92c85..4012ff6 100644
--- a/trigger/categories/tests/trigger_test.php
+++ b/trigger/categories/tests/trigger_test.php
@@ -60,7 +60,7 @@ class tool_lifecycle_trigger_categories_testcase extends \advanced_testcase {
      * Setup the testcase.
      * @throws \moodle_exception
      */
-    public function setUp() {
+    public function setUp() : void {
         $this->resetAfterTest(true);
         $this->setAdminUser();
 
diff --git a/trigger/delayedcourses/tests/trigger_test.php b/trigger/delayedcourses/tests/trigger_test.php
index 6560af5..6238981 100644
--- a/trigger/delayedcourses/tests/trigger_test.php
+++ b/trigger/delayedcourses/tests/trigger_test.php
@@ -57,7 +57,7 @@ class tool_lifecycle_trigger_delayedcourses_testcase extends \advanced_testcase
     /** @var workflow Workflow delaying processes for all workflows */
     private $workflowdealayingallworkflows;
 
-    public function setUp() {
+    public function setUp() : void {
         $this->resetAfterTest(true);
         $this->setAdminUser();
 
diff --git a/trigger/sitecourse/tests/trigger_test.php b/trigger/sitecourse/tests/trigger_test.php
index 1cec1ea..d9babbb 100644
--- a/trigger/sitecourse/tests/trigger_test.php
+++ b/trigger/sitecourse/tests/trigger_test.php
@@ -49,7 +49,7 @@ class tool_lifecycle_trigger_sitecourse_testcase extends \advanced_testcase {
      * Setup the testcase.
      * @throws coding_exception
      */
-    public function setUp() {
+    public function setUp() : void {
         $this->resetAfterTest(true);
         $this->setAdminUser();
 
diff --git a/trigger/startdatedelay/tests/trigger_test.php b/trigger/startdatedelay/tests/trigger_test.php
index eeab387..04ac2ae 100644
--- a/trigger/startdatedelay/tests/trigger_test.php
+++ b/trigger/startdatedelay/tests/trigger_test.php
@@ -48,7 +48,7 @@ class tool_lifecycle_trigger_startdatedelay_testcase extends \advanced_testcase
     /** @var $processor processor Instance of the lifecycle processor. */
     private $processor;
 
-    public function setUp() {
+    public function setUp() : void {
         $this->resetAfterTest(true);
         $this->setAdminUser();
 
-- 
GitLab