Skip to content

Commit bb6b9c9

Browse files
authored
Merge pull request #169 from catalyst/reusable-workflows-master
Add reusable workflow (master)
2 parents a7b7e41 + 452c9bf commit bb6b9c9

File tree

6 files changed

+23
-120
lines changed

6 files changed

+23
-120
lines changed

.github/workflows/ci.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# .github/workflows/ci.yml
2+
name: ci
3+
4+
on: [push, pull_request]
5+
6+
jobs:
7+
ci:
8+
uses: catalyst/catalyst-moodle-workflows/.github/workflows/ci.yml@main
9+
with:
10+
disable_behat: true

.travis.yml

-114
This file was deleted.

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
[![Build Status](https://travis-ci.org/catalyst/moodle-tool_crawler.svg?branch=master)](https://travis-ci.org/catalyst/moodle-tool_crawler)
1+
# moodle-tool_crawler
2+
3+
![GitHub Workflow Status (branch)](https://img.shields.io/github/workflow/status/catalyst/moodle-tool_crawler/ci/master?label=ci)
24

35
* [What is this?](#what-is-this)
46
* [How does it work?](#how-does-it-work)

db/uninstall.php

+1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
* Link checker robot plugin uninstall script.
1919
*
2020
* @package tool_crawler
21+
* @copyright 2019 Nicolas Roeser
2122
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2223
*/
2324

tests/phpunit/robot_crawler_test.php

+8-5
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,8 @@ public function test_uri_escaping() {
229229
preg_quote('href="' . $escapedexpected . '">' . $escapedexpected . '</a></small>', '@') .
230230
'@';
231231

232-
self::assertRegExp($expectedpattern, $page);
232+
// Workaround to ensure greater compatbilitiy since assertRegExp is deprecated.
233+
self::assertTrue(preg_match($expectedpattern, $page) === 1);
233234
}
234235

235236
/**
@@ -274,7 +275,9 @@ public function test_redirection_uri_escaping() {
274275
'.*' .
275276
preg_quote('<br>Redirect: <a href="' . $escapedredirecturl . '">' . $escapedredirecturl . '</a></h2>', '@') .
276277
'@';
277-
self::assertRegExp($expectedpattern, $page);
278+
279+
// Workaround to ensure greater compatbilitiy since assertRegExp is deprecated.
280+
self::assertTrue(preg_match($expectedpattern, $page) === 1);
278281
}
279282

280283
/**
@@ -570,7 +573,7 @@ public function url_validity_check_provider() {
570573
* Check url validity
571574
*
572575
* @param string $url the url to test
573-
* @param $expected the expected result
576+
* @param bool $expected the expected result
574577
*/
575578
public function test_invalid_url($url, $expected) {
576579
$baseurl = 'https://www.example.com/moodle';
@@ -599,8 +602,8 @@ public function page_title_validity_check_provider() {
599602
*
600603
* Test for Issue #143: invalid character in page title.
601604
*
602-
* @param $url the url to test
603-
* @param $expected
605+
* @param array $node The node to test.
606+
* @param string $expected
604607
*/
605608
public function test_check_page_title_validity($node, $expected) {
606609
$this->resetAfterTest(true);

version.php

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
$plugin->version = 2020101301; // The current plugin version (Date: YYYYMMDDXX)
3131
$plugin->release = 2020101301; // The current plugin version (Date: YYYYMMDDXX)
3232
$plugin->requires = 2016021800; // Requires this Moodle version.
33+
$plugin->supported = [34, 401];
3334
$plugin->component = 'tool_crawler'; // To check on upgrade, that module sits in correct place.
3435
$plugin->maturity = MATURITY_STABLE;
3536
$plugin->dependencies = array(

0 commit comments

Comments
 (0)