Problem/Motivation

Method validId is not testable because the method is static.
The limited support in phpunit for stubbing and mocking static methods has been removed in phpunit 4.0
https://github.com/sebastianbergmann/phpunit/wiki/Release-Announcement-f...

Proposed resolution

Make the method validId non static.

API changes

The method validId cannot be called directly anymore, the object needs to be instantiated first.

Comments

JacobFrancke created an issue. See original summary.

jacobfrancke@gmail.com’s picture

StatusFileSize
new1.23 KB

Here is the patch.

joseph.olstad’s picture

Status: Active » Fixed

fixed in 7.x-3.x dev branch

  • joseph.olstad committed af83687 on 7.x-3.x
    fix issue with the simpletests related to changes made in issue #2879430...
jacobfrancke@gmail.com’s picture

StatusFileSize
new970 bytes

Hi Joseph,

In the new release 3.1.0 the parse function has some more function calls to self::validID, because there was another patch from somebody else which added this.

Here is a new patch which fixes these calls to. Thanks for commiting this.

jacobfrancke@gmail.com’s picture

Status: Fixed » Active

  • JacobFrancke authored 171492f on 7.x-3.x
    Issue #2879430 by JacobFrancke: MediaInternetYouTubeHandler method...
joseph.olstad’s picture

Status: Active » Needs review

waiting to see what the testbot says

Could you by chance resolve or find a solution to this issue:
#2883644: Fix head tests for media_youtube 7.x-3.1

joseph.olstad’s picture

Status: Needs review » Fixed

no change to the test results.

Status: Fixed » Closed (fixed)

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