Make WordPress Core


Ignore:
Timestamp:
09/25/2026 03:31:07 PM (5 days ago)
Author:
lancewillett
Message:

Tests: Replace native assertions in PHPUnit test classes.

Use PHPUnit type assertions in test setup and helpers so checks remain active when native PHP assertions are disabled and report failures through PHPUnit.

Retain native assertions outside PHPUnit test classes and add messages describing their invariants.

Developed in: ​https://github.com/WordPress/wordpress-develop/pull/13651

Props soean.
See #64895.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/comment/wpNotifyNoteMentions.php

    r63924 r63936  
    122122                        )
    123123                );
    124                 assert( $comment instanceof WP_Comment );
     124                $this->assertInstanceOf( WP_Comment::class, $comment );
    125125                return $comment;
    126126        }
Note: See TracChangeset for help on using the changeset viewer.