<?php
use PHPUnit\Framework\TestCase;
final class DemoTest extends TestCase
{
public function testSomething()
{
self::assertJsonResponse(contentType: 'text/html');
}
protected static function assertJsonResponse(int $statusCode = 200, string $contentType = 'application/json'): void
{
// logic
}
}
The code is valid and needs no change.