aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Michel Vedrine <vedrine@vedrine.org>2018-01-02 23:51:05 +0100
committerJean-Michel Vedrine <vedrine@vedrine.org>2018-01-02 23:51:05 +0100
commit258faccefdf5adc8c6f39f80787142addd649aa8 (patch)
treeb3cdd14957bf02af986ce20233261d68519913e2
parent8f079b654779612dfc9aae041245d9f6c60270ad (diff)
Fix problem with allowedfuncs in tests
-rw-r--r--tests/helper.php2
-rw-r--r--tests/questiontype_test.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/helper.php b/tests/helper.php
index e0f0381..680b359 100644
--- a/tests/helper.php
+++ b/tests/helper.php
@@ -83,7 +83,7 @@ class qtype_algebra_test_helper extends question_test_helper {
$qdata->options->nchecks = '10';
$qdata->options->tolerance = 0.001;
$qdata->options->disallow = '';
- $qdata->options->allowedfuncs = '';
+ $qdata->options->allowedfuncs = array();
$qdata->options->answerprefix = '';
$qdata->options->answers = array(
13 => new question_answer(13, '7*x', 1.0, 'This is a very good answer.', FORMAT_HTML),
diff --git a/tests/questiontype_test.php b/tests/questiontype_test.php
index ee19d6b..d9ce497 100644
--- a/tests/questiontype_test.php
+++ b/tests/questiontype_test.php
@@ -114,7 +114,7 @@ class qtype_algebra_test extends advanced_testcase {
}
foreach ($questiondata->options as $optionname => $value) {
- if ($optionname != 'answers') {
+ if (!in_array($optionname, array('answers', 'variables'))) {
$this->assertAttributeEquals($value, $optionname, $actualquestiondata->options);
}
}