Files
fivem-mcp/tests/Feature/COX/GetOxFuelClientFunctionToolTest.php
T
Adrian Mejias 24c53368a7 Add COX tools for doorlock, fuel, and target functionalities
- Implemented GetOxDoorlockServerFunction and GetOxDoorlockClientFunction for server-side and client-side door management, respectively.
- Created GetOxFuelServerFunction and GetOxFuelClientFunction for handling fuel management on server and client sides.
- Developed GetOxTargetClientFunction to manage targeting interactions, including global options and zone management.
- Added feature tests for all new tools to ensure functionality and error handling for unknown functions.
2026-03-01 15:35:04 -06:00

35 lines
1.1 KiB
PHP

<?php
use App\Mcp\Tools\COX\Fuel\Client\GetOxFuelClientFunction;
use Laravel\Mcp\Request;
it('get ox_fuel client function returns response with content', function () {
$tool = new GetOxFuelClientFunction;
$request = new Request(['function_name' => 'setMoneyCheck']);
$response = $tool->handle($request);
expect($response)->not()->toBeNull();
expect($response->content())->not()->toBeNull();
});
it('get ox_fuel client function handles unknown function', function () {
$tool = new GetOxFuelClientFunction;
$request = new Request(['function_name' => 'NonExistentFunction123']);
$response = $tool->handle($request);
$content = (string) $response->content();
expect($content)->toContain('not found');
});
it('get ox_fuel client function supports javascript examples', function () {
$tool = new GetOxFuelClientFunction;
$request = new Request(['function_name' => 'setMoneyCheck', 'language' => 'js']);
$response = $tool->handle($request);
expect($response)->not()->toBeNull();
expect($response->content())->not()->toBeNull();
});