Changeset View
Changeset View
Standalone View
Standalone View
src/tests/Feature/Controller/HealthTest.php
- This file was added.
<?php | |||||
namespace Tests\Feature\Controller; | |||||
use Tests\TestCase; | |||||
/** | |||||
* @group files | |||||
*/ | |||||
class HealthTest extends TestCase | |||||
{ | |||||
/** | |||||
* {@inheritDoc} | |||||
*/ | |||||
public function setUp(): void | |||||
{ | |||||
parent::setUp(); | |||||
$this->useServicesUrl(); | |||||
} | |||||
/** | |||||
* {@inheritDoc} | |||||
*/ | |||||
public function tearDown(): void | |||||
{ | |||||
parent::tearDown(); | |||||
} | |||||
/** | |||||
* Test webhook | |||||
*/ | |||||
public function testStatus(): void | |||||
{ | |||||
$response = $this->get("api/webhooks/health/status"); | |||||
$response->assertStatus(200); | |||||
$json = $response->json(); | |||||
$this->assertSame('ok', $json['status']); | |||||
$this->assertTrue(array_key_exists('output', $json)); | |||||
} | |||||
} |