From 3077ae600427874b7548796cc1eb170bf2b495aa Mon Sep 17 00:00:00 2001 From: Mark Nielsen Date: Fri, 22 Jul 2016 11:18:55 -0700 Subject: [PATCH] MDL-55315 mod_lti: Fix Nginx 405 error It appears that Nginx doesn't allow POST to static files. So rename the fixture from a HTML file to a PHP file. --- mod/lti/tests/behat/addtool.feature | 2 +- mod/lti/tests/behat/addtype.feature | 2 +- mod/lti/tests/behat/toolconfigure.feature | 2 +- mod/lti/tests/fixtures/tool_provider.html | 8 ------ mod/lti/tests/fixtures/tool_provider.php | 33 +++++++++++++++++++++++ 5 files changed, 36 insertions(+), 11 deletions(-) delete mode 100644 mod/lti/tests/fixtures/tool_provider.html create mode 100644 mod/lti/tests/fixtures/tool_provider.php diff --git a/mod/lti/tests/behat/addtool.feature b/mod/lti/tests/behat/addtool.feature index 6da74b4e1e2c..27336fca35fc 100644 --- a/mod/lti/tests/behat/addtool.feature +++ b/mod/lti/tests/behat/addtool.feature @@ -21,7 +21,7 @@ Feature: Add tools And I set the following fields to these values: | Tool name | Teaching Tool 1 | | Tool configuration usage | Show in activity chooser and as a preconfigured tool | - And I set the field "Tool base URL/cartridge URL" to local url "/mod/lti/tests/fixtures/tool_provider.html" + And I set the field "Tool base URL/cartridge URL" to local url "/mod/lti/tests/fixtures/tool_provider.php" And I press "Save changes" And I log out diff --git a/mod/lti/tests/behat/addtype.feature b/mod/lti/tests/behat/addtype.feature index ecf14a20b8b2..3d1058694f62 100644 --- a/mod/lti/tests/behat/addtype.feature +++ b/mod/lti/tests/behat/addtype.feature @@ -67,7 +67,7 @@ Feature: Add preconfigured tools via teacher interface | Activity name | Test tool activity 1 | And I open "Test tool activity 1" actions menu And I follow "Edit settings" in the open menu - And I set the field "Launch/cartridge URL" to local url "/mod/lti/tests/fixtures/tool_provider.html" + And I set the field "Launch/cartridge URL" to local url "/mod/lti/tests/fixtures/tool_provider.php" And I press "Save and return to course" And I follow "Test tool activity 1" And I switch to "contentframe" iframe diff --git a/mod/lti/tests/behat/toolconfigure.feature b/mod/lti/tests/behat/toolconfigure.feature index e1afbda5350b..b30f5b10ad06 100644 --- a/mod/lti/tests/behat/toolconfigure.feature +++ b/mod/lti/tests/behat/toolconfigure.feature @@ -37,7 +37,7 @@ Feature: Configure tool types @javascript Scenario: Attempt to add a tool type from a configuration URL, then cancel - When I set the field "url" to local url "/mod/lti/tests/fixtures/tool_provider.html" + When I set the field "url" to local url "/mod/lti/tests/fixtures/tool_provider.php" And I press "Add" Then I should see "Cancel" And I press "cancel-external-registration" diff --git a/mod/lti/tests/fixtures/tool_provider.html b/mod/lti/tests/fixtures/tool_provider.html deleted file mode 100644 index 543a796bf40b..000000000000 --- a/mod/lti/tests/fixtures/tool_provider.html +++ /dev/null @@ -1,8 +0,0 @@ - - - Tool provider - - -

This represents a tool provider

- - diff --git a/mod/lti/tests/fixtures/tool_provider.php b/mod/lti/tests/fixtures/tool_provider.php new file mode 100644 index 000000000000..1f7f2427342c --- /dev/null +++ b/mod/lti/tests/fixtures/tool_provider.php @@ -0,0 +1,33 @@ +. + +/** + * Testing fixture. + * + * @package mod_lti + * @copyright 2016 John Okely + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +?> + + + Tool provider + + +

This represents a tool provider

+ +