clqms-be/tests/feature/Organization/HostAppControllerTest.php
OpenCode Bot 9946978487 chore: refresh CLQMS backend baseline
Re-synced controllers, configs, libraries, seeds, and docs with the latest API expectations and response helpers.
2026-04-08 16:07:19 +07:00

36 lines
756 B
PHP
Executable File

<?php
namespace Tests\Feature\Organization;
use CodeIgniter\Test\FeatureTestTrait;
use CodeIgniter\Test\CIUnitTestCase;
class HostAppControllerTest extends CIUnitTestCase
{
use FeatureTestTrait;
protected $endpoint = 'api/organization/hostapp';
protected function setUp(): void
{
parent::setUp();
}
public function testIndexHostApp()
{
$result = $this->get($this->endpoint);
$result->assertStatus(200);
}
public function testCreateHostApp()
{
$payload = [
'HostAppName' => 'Test Host Application',
'SiteID' => null
];
$result = $this->withBodyFormat('json')->post($this->endpoint, $payload);
$result->assertStatus(201);
}
}