- 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.
27 lines
799 B
PHP
27 lines
799 B
PHP
<?php
|
|
|
|
use App\Mcp\Tools\FiveM\GenerateManifest;
|
|
use Laravel\Mcp\Request;
|
|
|
|
it('generate manifest returns response with content', function () {
|
|
$tool = new GenerateManifest;
|
|
$request = new Request(['resource_name' => 'test-resource']);
|
|
|
|
$response = $tool->handle($request);
|
|
|
|
expect($response)->not()->toBeNull();
|
|
expect($response->content())->not()->toBeNull();
|
|
});
|
|
|
|
it('generate manifest includes required fields', function () {
|
|
$tool = new GenerateManifest;
|
|
$request = new Request(['resource_name' => 'my-test-resource']);
|
|
|
|
$response = $tool->handle($request);
|
|
$content = (string) $response->content();
|
|
|
|
expect($content)->toContain("fx_version 'cerulean'");
|
|
expect($content)->toContain("game 'gta5'");
|
|
expect($content)->toContain("lua54 'yes'");
|
|
});
|