Problem/Motivation

Tests fail in PHP 8.

CaptchaPointListBuilderTest::testBuildRow():

Prophecy\Exception\Call\UnexpectedCallException : Unexpected method call on Double\Drupal\captcha\Entity\CaptchaPoint\P5:
  - hasLinkTemplate(
        "edit-form"
    )
expected calls were:
  - access(
        *
    )
  - id(

    )
  - getCaptchaType(

    )

CaptchaCronTest::testCron():

TypeError : PDOStatement::fetchAll(): Argument #2 must be of type int, string given

Steps to reproduce

Run unit tests in PHP 8

Proposed resolution

Mock the hasLinkTemplate() method

Remaining tasks

  • Review patch
  • Enable weekly PHP 8 testing

User interface changes

N/A

API changes

N/A

Data model changes

N/A

Comments

mstrelan created an issue. See original summary.

mstrelan’s picture

StatusFileSize
new749 bytes
mstrelan’s picture

Title: [PHP8] Unexpected method call on Double\Drupal\captcha\Entity\CaptchaPoint\P5 » [PHP8] Fix test failures in PHP 8
Issue summary: View changes
StatusFileSize
new1.41 KB
mstrelan’s picture

Status: Active » Needs review
acbramley’s picture

Status: Needs review » Reviewed & tested by the community

Nice one, green run on PHP8.0 proves itself here :)

  • japerry committed d8b93fc on 8.x-1.x authored by mstrelan
    Issue #3220477 by mstrelan: [PHP8] Fix test failures in PHP 8
    
japerry’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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