- Implement tests for GetInventoryClientFunction and GetInventoryServerFunction in the COX namespace. - Create tests for GenerateManifest and GenerateResourceBoilerplate in the FiveM namespace. - Add tests for event and native function references in the FiveM namespace. - Introduce tests for QBCore client and server event references, functions, and configurations. - Implement tests for shared data retrieval in QBCore. - Ensure all tests validate expected responses and handle edge cases.
25 lines
684 B
PHP
25 lines
684 B
PHP
<?php
|
|
|
|
use App\Mcp\Tools\FiveM\SearchFiveMDocs;
|
|
use Laravel\Mcp\Request;
|
|
|
|
it('search fivem docs returns response with content', function () {
|
|
$tool = new SearchFiveMDocs;
|
|
$request = new Request(['query' => 'networking']);
|
|
|
|
$response = $tool->handle($request);
|
|
|
|
expect($response)->not()->toBeNull();
|
|
expect($response->content())->not()->toBeNull();
|
|
});
|
|
|
|
it('search fivem docs handles empty results', function () {
|
|
$tool = new SearchFiveMDocs;
|
|
$request = new Request(['query' => 'nonexistent_topic_xyz']);
|
|
|
|
$response = $tool->handle($request);
|
|
$content = (string) $response->content();
|
|
|
|
expect($content)->toContain('No documentation found');
|
|
});
|