Files
Php-Template/tests/Controllers/ControllerTest.php
Ron Rise fa1cc47b44
All checks were successful
🧪✨ Tests Workflow / 🛡️ 🔒 Library Audit (push) Successful in 2m38s
🧪✨ Tests Workflow / 📝 ✨ Code Lint (push) Successful in 2m29s
🧪✨ Tests Workflow / 🛡️ 🔒 License Check (push) Successful in 3m37s
🧪✨ Tests Workflow / 🐙 🔍 Code Sniffer (push) Successful in 3m33s
🧪✨ Tests Workflow / 🧪 ✨ Database Migrations (push) Successful in 3m55s
🧪✨ Tests Workflow / 🧪 ✅ Unit Tests (push) Successful in 1m4s
chore: update .dockerignore and .gitignore to exclude .idea and .DS_Store
2025-10-15 20:17:53 -04:00

55 lines
1.4 KiB
PHP

<?php
declare(strict_types=1);
namespace Siteworxpro\Tests\Controllers;
use Siteworxpro\App\Controllers\Controller;
class ControllerTest extends AbstractController
{
public function testNotFoundExceptions()
{
$testClass = new TestClass();
$this->expectException(\League\Route\Http\Exception\NotFoundException::class);
$testClass->get($this->getMockRequest());
}
public function testNotFoundExceptionPost()
{
$testClass = new TestClass();
$this->expectException(\League\Route\Http\Exception\NotFoundException::class);
$testClass->post($this->getMockRequest());
}
public function testNotFoundExceptionPut()
{
$testClass = new TestClass();
$this->expectException(\League\Route\Http\Exception\NotFoundException::class);
$testClass->put($this->getMockRequest());
}
public function testNotFoundExceptionDelete()
{
$testClass = new TestClass();
$this->expectException(\League\Route\Http\Exception\NotFoundException::class);
$testClass->delete($this->getMockRequest());
}
public function testNotFoundExceptionPatch()
{
$testClass = new TestClass();
$this->expectException(\League\Route\Http\Exception\NotFoundException::class);
$testClass->patch($this->getMockRequest());
}
}
class TestClass extends Controller // phpcs:ignore
{
}