Problem/Motivation

When I run the kernel test locally (using DDEV):

benji@vriksasana:~/Sites/drupal$ ddev phpunit -c /var/www/html/core modules/contrib/typogrify/tests/src/Kernel/TypogrifySmartyPantsTest.php
PHPUnit 11.5.44 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.4.10
Configuration: /var/www/html/core/phpunit.xml.dist

There was 1 PHPUnit error:

1) Drupal\Tests\typogrify\Kernel\TypogrifySmartyPantsTest::testTypogrify
The data provider specified for Drupal\Tests\typogrify\Kernel\TypogrifySmartyPantsTest::testTypogrify is invalid
Data Provider method Drupal\Tests\typogrify\Kernel\TypogrifySmartyPantsTest::providerTypogrifyExamples() is not static

/var/www/html/modules/contrib/typogrify/tests/src/Kernel/TypogrifySmartyPantsTest.php:45

--

There were 2 PHPUnit test runner warnings:

1) Option c cannot be used more than once

2) No tests found in class "Drupal\Tests\typogrify\Kernel\TypogrifySmartyPantsTest".

No tests executed!
Failed to run phpunit.sh -c /var/www/html/core modules/contrib/typogrify/tests/src/Kernel/TypogrifySmartyPantsTest.php: exit status 2

Steps to reproduce

Proposed resolution

Add static to the declaration of the data provider.

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Issue fork typogrify-3567314

Command icon Show commands

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

benjifisher created an issue. See original summary.

benjifisher’s picture

Status: Active » Needs review

I do not think there is enough interest in this module to find a reviewer, but I am setting the status to NR for now. I plan to commit the change unless the automated tests tell me not to.

benjifisher’s picture

Status: Needs review » Reviewed & tested by the community

Do I have to set the status to RTBC in order to see the merge option on this page?

  • benjifisher committed 09ce3342 on 8.x-1.x
    Issue #3567314: declare the data provider as static
    
benjifisher’s picture

Status: Reviewed & tested by the community » Fixed

I no longer see the option to merge here on the issue, so I did it in GitLab, from the MR.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

benjifisher’s picture

Assigned: benjifisher » Unassigned
benjifisher’s picture

Category: Bug report » Task

Status: Fixed » Closed (fixed)

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