Replace assert* involving an instanceof operator with assertInstanceOf()/assertNotInstanceOf()

Created on 12 May 2020, over 4 years ago
Updated 11 December 2023, about 1 year ago

Problem/Motivation

As title

Proposed resolution

Recommended regex for searching: assert\w+\(.+instanceof.+\)

Example:

-    $this->assertTrue($property instanceof StringInterface, 'Got the right wrapper fo the page.front property.');
+    $this->assertInstanceOf(StringInterface::class, $property, 'Got the right wrapper fo the page.front property.');

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Fixed

Version

2.0

Component

Tests

Created by

πŸ‡ΊπŸ‡¦Ukraine reflie

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024