more tests
Some checks failed
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Has started running
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Has started running
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Has started running
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Has been cancelled
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Has started running
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Has started running

This commit is contained in:
2025-11-14 20:41:35 -05:00
parent 474134c654
commit 20a4f51402
11 changed files with 709 additions and 28 deletions

View File

@@ -11,7 +11,7 @@ use Siteworxpro\App\Http\Middleware\CorsMiddleware;
use Siteworxpro\App\Services\Facades\Config;
use Siteworxpro\Tests\Unit;
class CorsMiddlewareTest extends Unit
class CorsMiddlewareTest extends Middleware
{
public function testAllowsConfiguredOrigin(): void
{
@@ -80,22 +80,4 @@ class CorsMiddlewareTest extends Unit
$this->assertEquals('true', $response->getHeaderLine('Access-Control-Allow-Credentials'));
}
private function mockHandler(Response $response): RequestHandlerInterface
{
return new class ($response) implements RequestHandlerInterface {
private Response $response;
public function __construct(Response $response)
{
$this->response = $response;
}
public function handle(
\Psr\Http\Message\ServerRequestInterface $request
): \Psr\Http\Message\ResponseInterface {
return $this->response;
}
};
}
}