Comments

DamienMcKenna created an issue. See original summary.

damienmckenna’s picture

Test failure 1:

1) Drupal\Tests\metatag\Functional\EnsureDevelWebProfilerWorks::testCustomRoute
PHPUnit\Framework\Exception: Fatal error: Class Drupal\webprofiler\Entity\Decorators\Config\ConfigEntityStorageDecorator contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Drupal\Core\Entity\EntityStorageInterface::getEntityClass) in /var/www/html/modules/contrib/devel/webprofiler/src/Entity/Decorators/Config/ConfigEntityStorageDecorator.php on line 18

This is a bug in the WebProfiler module that comes with the Devel module.

Test failure 2:

1) Drupal\Tests\metatag\Kernel\Migrate\d7\MetatagEntitiesTest::testMetatag
PHPUnit\Framework\Exception: PHP Fatal error:  Uncaught Exception: Serialization of 'Closure' is not allowed in Standard input code:89
Stack trace:
#0 Standard input code(89): serialize(Array)
#1 Standard input code(123): __phpunit_run_isolated_test()
#2 {main}
  thrown in Standard input code on line 89
Fatal error: Uncaught Exception: Serialization of 'Closure' is not allowed in Standard input code:89
Stack trace:
#0 Standard input code(89): serialize(Array)
#1 Standard input code(123): __phpunit_run_isolated_test()
#2 {main}
  thrown in Standard input code on line 89

I think this refers to lines like this:

    $this->assertSame(serialize($expected), $node->field_metatag->value);

Maybe that should unserialize the node value and compare it against the raw array, i.e. turning the comparison backwards?

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new1.65 KB

Will this work?

damienmckenna’s picture

Status: Needs review » Needs work

Nope, that didn't work.

damienmckenna’s picture

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new11.6 KB

The actual test failures are:

  1x: Declaring ::setUp without a void return typehint in Drupal\Tests\metatag\Kernel\Migrate\d7\MetatagEntitiesTest is deprecated in drupal:9.0.0. Typehinting will be required before drupal:10.0.0. See https://www.drupal.org/node/3114724
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

  1x: The Drupal\Tests\metatag\Kernel\Migrate\d7\MetatagEntitiesTest::$modules property must be declared protected. See https://www.drupal.org/node/2909426
    1x in DrupalListener::startTest from Drupal\Tests\Listeners

Thanks to the patch from #3197324 I can actually see what the errors are.

damienmckenna’s picture

StatusFileSize
new11.56 KB

Rerolled after #3252359 was committed.

damienmckenna’s picture

Status: Needs review » Needs work

The remaining failure, that isn't because of the Devel module, is:

1) Drupal\Tests\metatag\Kernel\Migrate\d7\MetatagEntitiesTest::testMetatag
Attempt to create a field field_event that does not exist on entity type node. (/var/www/html/core/modules/field/src/Entity/FieldConfig.php:315)
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'status'
+'error'
damienmckenna’s picture

Let's remove the Devel test entirely.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new12.43 KB

The only difference in this file is the removal of EnsureDevelWebProfilerWorks.php.

Status: Needs review » Needs work

The last submitted patch, 10: metatag-n3252159-10.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

eugene bocharov’s picture

Status: Needs work » Needs review
StatusFileSize
new12.58 KB

It seems to be related with changes at https://git.drupalcode.org/project/drupal/-/commit/4e87f84

Adding datetime_range to the $modules solves the problem in 9.3.

damienmckenna’s picture

Status: Needs review » Reviewed & tested by the community

*mindblown*

Wow, thank you so much!

damienmckenna’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thank you Eugene for solving the last puzzle piece!

  • DamienMcKenna committed 6114ec0 on 8.x-1.x
    Issue #3252159 by DamienMcKenna, Eugene Bocharov: Fix tests...
eugene bocharov’s picture

Thank you Damien for active maintenance such a great module.

damienmckenna’s picture

For prosperity, cross-linking the issue that caused some of the tests to fail: #3095237: Migrate Drupal 7 date field "todate" value

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.