Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix343 #346

Merged
merged 2 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions tests/local/controllers/maintenance_static_page_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function test_removescripttags() {
* Test remove script tags.
*/
public function test_updatelinkstylesheet() {
$localcsslink = $this->get_fixture_path('simple.css');
$localcsslink = $this->get_fixture_path_location('simple.css');
$externalcsslink = 'http://google.com/coolstuff.css';
$html = "<!DOCTYPE html>\n".
'<html><head><link href="'.$localcsslink.'" rel="stylesheet" /><title>Title</title></head>'.
Expand All @@ -114,7 +114,7 @@ public function test_updatelinkstylesheet() {
* Test update link style sheet urls.
*/
public function test_updatelinkstylesheet_urls() {
$localcsslink = $this->get_fixture_path('withurls.css');
$localcsslink = $this->get_fixture_path_location('withurls.css');
$html = "<!DOCTYPE html>\n".
'<html><head><link href="'.$localcsslink.'" rel="stylesheet" /><title>Title</title></head>'.
'<body>Content</body></html>';
Expand All @@ -132,7 +132,7 @@ public function test_updatelinkstylesheet_urls() {
* Test update link style sheet urls quoted.
*/
public function test_updatelinkstylesheet_urls_quoted() {
$localcsslink = $this->get_fixture_path('withurls-quoted.css');
$localcsslink = $this->get_fixture_path_location('withurls-quoted.css');
$html = "<!DOCTYPE html>\n".
'<html><head><link href="'.$localcsslink.'" rel="stylesheet" /><title>Title</title></head>'.
'<body>Content</body></html>';
Expand All @@ -150,7 +150,7 @@ public function test_updatelinkstylesheet_urls_quoted() {
* Test update link style sheet urls with sub dir.
*/
public function test_updatelinkstylesheet_urls_subdir() {
$localcsslink = $this->get_fixture_path('subdir/withurls-subdir.css');
$localcsslink = $this->get_fixture_path_location('subdir/withurls-subdir.css');
$html = "<!DOCTYPE html>\n".
'<html><head><link href="'.$localcsslink.'" rel="stylesheet" /><title>Title</title></head>'.
'<body>Content</body></html>';
Expand All @@ -168,7 +168,7 @@ public function test_updatelinkstylesheet_urls_subdir() {
* Test update images to file.php style link.
*/
public function test_updateimages() {
$localimglink = $this->get_fixture_path('catalyst.png');
$localimglink = $this->get_fixture_path_location('catalyst.png');
$externalimglink = 'http://google.com/coolstyle.css';
$html = "<!DOCTYPE html>\n".
'<html><head><title>Title</title></head>'.
Expand All @@ -184,7 +184,7 @@ public function test_updateimages() {
* Test update favicon to file.php style link.
*/
public function test_updatelinkfavicon() {
$link = $this->get_fixture_path('catalyst.png');
$link = $this->get_fixture_path_location('catalyst.png');
$html = "<!DOCTYPE html>\n".
'<html><head><title>Title</title><link rel="shortcut icon" href="'.$link.'""></head>'.
'<body>Content</body></html>';
Expand Down Expand Up @@ -253,7 +253,7 @@ public function test_update_inline_background_images($stylecontent, $rewrite) {
* Test update preview path to file.php style link.
*/
public function test_previewpath() {
$link = $this->get_fixture_path('catalyst.png');
$link = $this->get_fixture_path_location('catalyst.png');
$html = "<!DOCTYPE html>\n".
'<html><head><title>Title</title><link rel="shortcut icon" href="'.$link.'""></head>'.
'<body>Content</body></html>';
Expand Down Expand Up @@ -313,7 +313,7 @@ public function test_updatestaticpage_hasfile() {
public function test_createdfile() {
global $CFG;

$link = $this->get_fixture_path('catalyst.png');
$link = $this->get_fixture_path_location('catalyst.png');
$html = "<!DOCTYPE html>\n".
'<html><head><title>Title</title></head>'.
'<body>Content<img src="'.$link.'" /></body></html>';
Expand All @@ -337,7 +337,7 @@ public function test_createdfile() {
*
* @return string
*/
private function get_fixture_path($file) {
private function get_fixture_path_location($file) {
return (string)new \moodle_url('/auth/outage/tests/local/controllers/fixtures/'.$file);
}

Expand Down
2 changes: 1 addition & 1 deletion version.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@
$plugin->release = 2024081900; // Human-readable release information.
$plugin->requires = 2017111309; // 2017111309 = T13, but this really requires 3.9 and higher.
$plugin->maturity = MATURITY_STABLE; // Suitable for PRODUCTION environments!
$plugin->supported = [39, 404]; // A range of branch numbers of supported moodle versions.
$plugin->supported = [39, 405]; // A range of branch numbers of supported moodle versions.
Loading