Closed (fixed)
Project:
Datetime testing
Version:
8.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
19 May 2024 at 17:06 UTC
Updated:
8 Oct 2024 at 09:19 UTC
Jump to comment: Most recent
Adding the GitLab CI template identified some phpstan issues:
------ ----------------------------------------------------------------------
Line src/DatetimeTestingContext.behat.inc
------ ----------------------------------------------------------------------
10 Class DatetimeTestingContext extends unknown class
Drupal\DrupalExtension\Context\DrupalSubContextBase.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
10 Class DatetimeTestingContext implements unknown interface
Drupal\DrupalExtension\Context\DrupalSubContextInterface.
💡 Learn more at https://phpstan.org/user-guide/discovering-symbols
21 Call to an undefined method DatetimeTestingContext::getDriver().
22 \Drupal calls should be avoided in classes, use dependency injection
instead
32 Call to an undefined method DatetimeTestingContext::getDriver().
33 \Drupal calls should be avoided in classes, use dependency injection
instead
34 \Drupal calls should be avoided in classes, use dependency injection
instead
43 Call to an undefined method DatetimeTestingContext::getDriver().
44 \Drupal calls should be avoided in classes, use dependency injection
instead
53 Call to an undefined method DatetimeTestingContext::getDriver().
54 \Drupal calls should be avoided in classes, use dependency injection
instead
62 Parameter $scope of method DatetimeTestingContext::resetTime() has
invalid type Behat\Behat\Hook\Scope\AfterScenarioScope.
63 Call to an undefined method DatetimeTestingContext::getDriver().
64 \Drupal calls should be avoided in classes, use dependency injection
instead
65 \Drupal calls should be avoided in classes, use dependency injection
instead
------ ----------------------------------------------------------------------
------ ----------------------------------------------------------------------
Line src/TestDateTime.php
------ ----------------------------------------------------------------------
60 \Drupal calls should be avoided in classes, use dependency injection
instead
------ ----------------------------------------------------------------------
Let's fix these.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
ptmkenny commentedThe MR is ready to go, but the Behat Drupal Extension does not support Drupal 11, so tests are failing. I'll commit this once the Drupal Extension can be installed on Drupal 11.
Comment #4
ptmkenny commentedComment #5
ptmkenny commentedDrupal Extension doesn't work on Drupal 11 yet: https://github.com/jhedstrom/drupalextension/issues/669
Comment #7
ptmkenny commented