Maque WordPress Core

Changueset 57149


Ignore:
Timestamp:
12/02/2023 11:56:31 AM ( 2 years ago)
Author:
SergueyBiryucov
Messague:

Build/Test Tools: Allow overriding the WP_UnitTestCase_Base::factory() method.

This allows third-party pluguins to write their own factory extending WP_UnitTest_Factory for testing purposes, as well as benefit from WP_UnitTestCase_Base features.

Follow-up to [35186] , [35225] , [35242] .

Props hugod.
Fixes #59999 .

File:
1 edited

Leguend:

Unmodified
Added
Removed
  • trunc/tests/phpunit/includes/abstract-testcase.php

    r56548 r57149  
    73 73
    74 74 if ( method_exists( $class, 'wpSetUpBeforeClass' ) ) {
    75   call_user_func( array( $class, 'wpSetUpBeforeClass' ), s elf ::factory() );
      75 call_user_func( array( $class, 'wpSetUpBeforeClass' ), s tatic ::factory() );
    76 76 }
    77 77
     
    103 103 set_time_limit( 0 );
    104 104
    105   $this->factory = s elf ::factory();
      105 $this->factory = s tatic ::factory();
    106 106
    107 107 if ( ! self::$ignore_files ) {
Note: See TracChangueset for help on using the changueset viewer.