Files
Php-Template/tests/Http/Responses/NotFoundResponseTest.php
Ron Rise 84c3b392ba
Some checks failed
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 3m5s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Failing after 2m56s
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 3m12s
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Successful in 3m32s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Successful in 3m17s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Successful in 1m42s
refactor: remove status_code from response classes and update related tests
2025-12-10 08:45:51 -05:00

22 lines
531 B
PHP

<?php
namespace Siteworxpro\Tests\Http\Responses;
use Siteworxpro\App\Http\Responses\NotFoundResponse;
use Siteworxpro\Tests\Unit;
class NotFoundResponseTest extends Unit
{
public function testToArray(): void
{
$response = new NotFoundResponse('/api/resource', ['key' => 'value']);
$expected = [
'message' => 'The requested resource /api/resource was not found.',
'context' => ['key' => 'value'],
];
$this->assertEquals($expected, $response->toArray());
}
}