Skip to content

Failing core unit test due to install.xml file #262

Description

@PhMemmel

To reproduce:

Run vendor/bin/phpunit --filter lifecycletrigger_byrole

This will trigger a core test to run and fail.

You won't see that in the tool_lifecycle GHA pipelines, because subplugin unit tests are not being run. But even if, you still won't see it in the GHA pipelines, because moodle-plugin-ci only runs the tests of the plugin, but not core tests against your plugin.

1) core\db\plugin_checks_test::test_db_install_file with data set "lifecycletrigger_byrole" ('lifecycletrigger_byrole', 'lifecycletrigger', 'byrole', '/var/www/html/admin/tool/life...byrole')
XMLDB structure does not match the install.xml file in /var/www/html/admin/tool/lifecycle/trigger/byrole/db/install.xml
Failed asserting that two DOM documents are equal.
--- Expected
+++ Actual
@@ @@
 <?xml version="1.0"?>
-<XMLDB xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" COMMENT="XMLDB file for Moodle lifecycle_trigger/byrole" PATH="admin/tool/lifecycle/trigger/byrole/db" VERSION="2019082300" xsi:noNamespaceSchemaLocation="../../../lib/xmldb/xmldb.xsd">
+<XMLDB xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" COMMENT="XMLDB file for Moodle lifecycle_trigger/byrole" PATH="admin/tool/lifecycle/trigger/byrole/db" VERSION="2019082300" xsi:noNamespaceSchemaLocation="../../../../../../lib/xmldb/xmldb.xsd">
   <TABLES>
     <TABLE COMMENT="table containing all mails which still have to be sent" NAME="lifecycletrigger_byrole">
       <FIELDS>

/var/www/html/lib/tests/db/plugin_checks_test.php:55

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions