Skip to content

The tool_trigger_logdump_action_step_testcase unit test is failing #159

Open
@golenkovm

Description

@golenkovm

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions