@@ -72,6 +72,11 @@ protected function setUp() {
7272 * @see repository_owncloud_lib_testcase::test_get_file
7373 */
7474 public function test_get_file_migration () {
75+ global $ CFG ;
76+ if ($ CFG ->branch < 36 ) {
77+ // No functionality in Moodle 3.5 and lower.
78+ return ;
79+ }
7580 $ instance = $ this ->generator ->create_instance ([
7681 'issuerid ' => $ this ->issuer ->get ('id ' ),
7782 'pluginname ' => 'ownCloud ' ,
@@ -115,6 +120,11 @@ public function test_get_file_migration() {
115120 * If there is no instance, migration shall fail.
116121 */
117122 public function test_nothing_to_migrate () {
123+ global $ CFG ;
124+ if ($ CFG ->branch < 36 ) {
125+ // No functionality in Moodle 3.5 and lower.
126+ return ;
127+ }
118128 // Purge caches.
119129 \cache::make ('core ' , 'repositories ' )->purge ();
120130
@@ -129,7 +139,13 @@ public function test_nothing_to_migrate() {
129139 * Test that, after migration, there is no ownCloud type. The one existing instance must be of the Nextcloud type afterwards.
130140 */
131141 public function test_migrate_one_instance () {
132- $ instance = $ this ->generator ->create_instance ([
142+ global $ CFG ;
143+ if ($ CFG ->branch < 36 ) {
144+ // No functionality in Moodle 3.5 and lower.
145+ return ;
146+ }
147+
148+ $ this ->generator ->create_instance ([
133149 'issuerid ' => $ this ->issuer ->get ('id ' ),
134150 'pluginname ' => 'ownCloud ' ,
135151 'controlledlinkfoldername ' => 'Moodlefiles ' ,
0 commit comments