You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
flight-core/tests/server/OverwriteBodyMiddleware.php

22 lines
442 B

<?php
declare(strict_types=1);
namespace Tests\Server;
use Flight;
class OverwriteBodyMiddleware
{
public function after(): void
{
$response = Flight::response();
$response->write(str_replace(
'<span style="color:red; font-weight: bold;">failed</span>',
'<span style="color:green; font-weight: bold;">successfully works!</span>',
$response->getBody()
), true);
}
}