engelsystem/tests/Unit/Controllers/HealthControllerTest.php

28 lines
750 B
PHP
Raw Permalink Normal View History

<?php
declare(strict_types=1);
namespace Engelsystem\Test\Unit\Controllers;
use Engelsystem\Controllers\HealthController;
use Engelsystem\Http\Response;
use Engelsystem\Test\Unit\TestCase;
use PHPUnit\Framework\MockObject\MockObject;
class HealthControllerTest extends TestCase
{
/**
* @covers \Engelsystem\Controllers\HealthController::__construct
* @covers \Engelsystem\Controllers\HealthController::index
*/
public function testIndex(): void
{
/** @var Response|MockObject $response */
$response = $this->createMock(Response::class);
$this->setExpects($response, 'withContent', ['Ok'], $response);
$controller = new HealthController($response);
$controller->index();
}
}