- Introduced a new code snippets resource for common FiveM patterns in Lua and JavaScript. - Added a framework comparison document outlining Standalone, ESX, and QBCore features. - Created search results view for FiveM documentation queries. - Developed client and server template scripts for ESX and QBCore frameworks. - Implemented NUI templates including HTML, CSS, and JavaScript for user interfaces. - Established routes for documentation and console commands. - Added tests for various features including documentation routes and tool functionalities. - Configured Vite for asset management with Laravel. - Updated .gitignore files for storage and framework directories.
25 lines
682 B
PHP
25 lines
682 B
PHP
<?php
|
|
|
|
use App\Mcp\Tools\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');
|
|
});
|