The `tool_trigger_logdump_action_step_testcase` unit test is failing

オープン
#159 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
php
領域
testing

調査の方向性

Start with admin/tool/trigger/tests/logdump_action_step_test.php at the failing assertion and compare it with the output from logdump_action_step.php; the report shows the expected array formatting differs from the actual output. Re-run the provided PHPUnit command to check the failure in your environment, then determine whether the assertion or output is responsible. Done means the test passes consistently across environments.

索引モデルが issue の本文から書いたものです。

説明

bug

Full error:

root@061f555b1326:/var/www/vanilla-moodle-39# vendor/bin/phpunit --testsuite='tool_trigger_testsuite' --filter='test_execute'
Moodle 3.9.11+ (Build: 20211112), 530c2ac613376fd5f4b3ef65843afa26bb08f11f
Php: 7.4.25, pgsql: 9.6.16, OS: Linux 5.4.0-89-generic x86_64
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.

..................................F............                   47 / 47 (100%)

Time: 5.39 seconds, Memory: 101.00 MB

There was 1 failure:

1) tool_trigger_logdump_action_step_testcase::test_execute
Failed asserting that '/var/www/vanilla-moodle-39/admin/tool/trigger/classes/steps/actions/logdump_action_step.php:58:\n
array(17) {\n
  'eventname' =>\n
  string(31) "\core\event\user_profile_viewed"\n
  'component' =>\n
  string(4) "core"\n
  'action' =>\n
  string(6) "viewed"\n
  'target' =>\n
  string(12) "user_profile"\n
  'objecttable' =>\n
  string(4) "user"\n
  'objectid' =>\n
  string(1) "2"\n
  'crud' =>\n
  string(1) "r"\n
  'edulevel' =>\n
  int(0)\n
  'contextid' =>\n
  int(5)\n
  'contextlevel' =>\n
  int(30)\n
  'contextinstanceid' =>\n
  string(1) "2"\n
  'userid' =>\n
  int(0)\n
  'courseid' =>\n
  int(0)\n
  'relateduserid' =>\n
  string(1) "2"\n
  'anonymous' =>\n
  int(0)\n
  'other' =>\n
  array(3) {\n
    'courseid' =>\n
    int(1)\n
    'courseshortname' =>\n
    string(10) "short name"\n
    'coursefullname' =>\n
    string(9) "full name"\n
  }\n
  'timecreated' =>\n
  int(1636789859)\n
}\n
/var/www/vanilla-moodle-39/admin/tool/trigger/classes/steps/actions/logdump_action_step.php:59:\n
NULL\n
/var/www/vanilla-moodle-39/admin/tool/trigger/classes/steps/actions/logdump_action_step.php:60:\n
array(2) {\n
  'foo' =>\n
  string(3) "bar"\n
  'baz' =>\n
  string(3) "bax"\n
}\n
' contains "  ["eventname"]=>
  string(31) "\core\event\user_profile_viewed"
  ["component"]=>
  string(4) "core"
  ["action"]=>
  string(6) "viewed"
  ["target"]=>
  string(12) "user_profile"
  ["objecttable"]=>
  string(4) "user"
  ["objectid"]=>
  string(1) "2"".

/var/www/vanilla-moodle-39/admin/tool/trigger/tests/logdump_action_step_test.php:83
/var/www/vanilla-moodle-39/lib/phpunit/classes/basic_testcase.php:64

To re-run:
 vendor/bin/phpunit "tool_trigger_logdump_action_step_testcase" admin/tool/trigger/tests/logdump_action_step_test.php

FAILURES!
Tests: 47, Assertions: 248, Failures: 1.

Interesting that this isn't failing in all envs. I'll try to figure out more details on this

主要言語
PHP
スター
46
フォーク
29
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

catalyst/moodle-tool_trigger のほかの issue

catalyst/moodle-tool_trigger の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。