2020-01-02 14:14:03 +01:00
|
|
|
<?php
|
|
|
|
|
2023-02-03 20:41:59 +01:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
2020-01-02 14:14:03 +01:00
|
|
|
namespace Engelsystem\Test\Feature\Controllers\Metrics;
|
|
|
|
|
|
|
|
use Engelsystem\Controllers\Metrics\Controller;
|
|
|
|
use Engelsystem\Test\Feature\ApplicationFeatureTest;
|
|
|
|
|
|
|
|
class ControllerTest extends ApplicationFeatureTest
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @covers \Engelsystem\Controllers\Metrics\Controller::metrics
|
|
|
|
*/
|
2022-12-14 19:15:20 +01:00
|
|
|
public function testMetrics(): void
|
2020-01-02 14:14:03 +01:00
|
|
|
{
|
2020-09-12 20:53:09 +02:00
|
|
|
config([
|
|
|
|
'api_key' => null,
|
|
|
|
'metrics' => ['work' => [60 * 60], 'voucher' => [1]],
|
2021-04-29 21:58:20 +02:00
|
|
|
'themes' => [1 => ['name' => 'Test']],
|
2020-09-12 20:53:09 +02:00
|
|
|
]);
|
2020-01-02 14:14:03 +01:00
|
|
|
|
|
|
|
/** @var Controller $controller */
|
|
|
|
$controller = app()->make(Controller::class);
|
|
|
|
$response = $controller->metrics();
|
|
|
|
|
|
|
|
$this->assertEquals(200, $response->getStatusCode());
|
|
|
|
}
|
|
|
|
}
|