From 6e4dcb9a47c041925d871725b06d05b1c7bf8b52 Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Wed, 9 Oct 2013 16:53:21 +0800 Subject: [PATCH] MDL-40493 Question: Explain why setAdminUser is needed for tests --- question/behaviour/manualgraded/tests/walkthrough_test.php | 3 +++ question/type/essay/tests/walkthrough_test.php | 2 ++ 2 files changed, 5 insertions(+) diff --git a/question/behaviour/manualgraded/tests/walkthrough_test.php b/question/behaviour/manualgraded/tests/walkthrough_test.php index 2a3aaea2dd1..1207ad75040 100644 --- a/question/behaviour/manualgraded/tests/walkthrough_test.php +++ b/question/behaviour/manualgraded/tests/walkthrough_test.php @@ -41,6 +41,7 @@ require_once(dirname(__FILE__) . '/../../../engine/tests/helpers.php'); class qbehaviour_manualgraded_walkthrough_testcase extends qbehaviour_walkthrough_test_base { public function test_manual_graded_essay() { + // The current text editor depends on the users profile setting - so it needs a valid user. $this->setAdminUser(); // Create an essay question. @@ -110,6 +111,7 @@ class qbehaviour_manualgraded_walkthrough_testcase extends qbehaviour_walkthroug public function test_manual_graded_essay_not_answered() { + // The current text editor depends on the users profile setting - so it needs a valid user. $this->setAdminUser(); // Create an essay question. @@ -272,6 +274,7 @@ class qbehaviour_manualgraded_walkthrough_testcase extends qbehaviour_walkthroug public function test_manual_graded_essay_can_grade_0() { + // The current text editor depends on the users profile setting - so it needs a valid user. $this->setAdminUser(); // Create an essay question. diff --git a/question/type/essay/tests/walkthrough_test.php b/question/type/essay/tests/walkthrough_test.php index 242951b46ea..e0a099fcde6 100644 --- a/question/type/essay/tests/walkthrough_test.php +++ b/question/type/essay/tests/walkthrough_test.php @@ -74,6 +74,7 @@ class qtype_essay_walkthrough_testcase extends qbehaviour_walkthrough_test_base public function test_deferred_feedback_html_editor() { + // The current text editor depends on the users profile setting - so it needs a valid user. $this->setAdminUser(); // Create an essay question. @@ -180,6 +181,7 @@ class qtype_essay_walkthrough_testcase extends qbehaviour_walkthrough_test_base public function test_responsetemplate() { + // The current text editor depends on the users profile setting - so it needs a valid user. $this->setAdminUser(); // Create an essay question. -- 2.43.0