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

13 lines
351 B

<?php
declare(strict_types=1);
class OverwriteBodyMiddleware
{
public function after()
{
$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);
}
}