2020-09-01 00:27:29 +02:00
|
|
|
<?php
|
|
|
|
|
2023-02-03 20:41:59 +01:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2020-09-01 00:27:29 +02:00
|
|
|
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
|
|
|
|
*/
|
2022-12-14 19:15:20 +01:00
|
|
|
public function testIndex(): void
|
2020-09-01 00:27:29 +02:00
|
|
|
{
|
|
|
|
/** @var Response|MockObject $response */
|
|
|
|
$response = $this->createMock(Response::class);
|
|
|
|
$this->setExpects($response, 'withContent', ['Ok'], $response);
|
|
|
|
|
|
|
|
$controller = new HealthController($response);
|
|
|
|
$controller->index();
|
|
|
|
}
|
|
|
|
}
|