Implement JQHTML function cache ID system and fix bundle compilation Implement underscore prefix for system tables Fix JS syntax linter to support decorators and grant exception to Task system SPA: Update planning docs and wishlists with remaining features SPA: Document Navigation API abandonment and future enhancements Implement SPA browser integration with History API (Phase 1) Convert contacts view page to SPA action Convert clients pages to SPA actions and document conversion procedure SPA: Merge GET parameters and update documentation Implement SPA route URL generation in JavaScript and PHP Implement SPA bootstrap controller architecture Add SPA routing manual page (rsx:man spa) Add SPA routing documentation to CLAUDE.md Phase 4 Complete: Client-side SPA routing implementation Update get_routes() consumers for unified route structure Complete SPA Phase 3: PHP-side route type detection and is_spa flag Restore unified routes structure and Manifest_Query class Refactor route indexing and add SPA infrastructure Phase 3 Complete: SPA route registration in manifest Implement SPA Phase 2: Extract router code and test decorators Rename Jqhtml_Component to Component and complete SPA foundation setup 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
63 lines
1.7 KiB
PHP
Executable File
63 lines
1.7 KiB
PHP
Executable File
<?php
|
|
/**
|
|
* CODING CONVENTION:
|
|
* This file follows the coding convention where variable_names and function_names
|
|
* use snake_case (underscore_wherever_possible).
|
|
*/
|
|
|
|
namespace App\RSpade\Tests\Services;
|
|
|
|
use App\RSpade\Core\Service\Rsx_Service_Abstract;
|
|
use App\RSpade\Core\Task\Task_Instance;
|
|
|
|
/**
|
|
* Service Test Service
|
|
*
|
|
* Test service for validating task execution system.
|
|
*/
|
|
class Service_Test_Service extends Rsx_Service_Abstract
|
|
{
|
|
/**
|
|
* Hello world test task
|
|
*
|
|
* @param Task_Instance $task Task instance for logging
|
|
* @param array $params Task parameters
|
|
* @return array Result data
|
|
*/
|
|
#[Task('Simple test task that returns hello world')]
|
|
public static function hello_world(Task_Instance $task, array $params = []): array
|
|
{
|
|
$task->info('Hello world task executed');
|
|
$task->debug('Debug message from hello_world task');
|
|
|
|
$name = $params['name'] ?? 'World';
|
|
|
|
return [
|
|
'message' => "Hello, {$name}!",
|
|
'timestamp' => date('Y-m-d H:i:s'),
|
|
];
|
|
}
|
|
|
|
/**
|
|
* Test task with logging
|
|
*
|
|
* @param Task_Instance $task Task instance for logging
|
|
* @param array $params Task parameters
|
|
* @return array Result data
|
|
*/
|
|
#[Task_Attribute('Test task that demonstrates logging functionality')]
|
|
public static function test_logging(Task_Instance $task, array $params = []): array
|
|
{
|
|
$task->info('Starting logging test');
|
|
$task->debug('This is a debug message');
|
|
$task->info('Processing step 1');
|
|
$task->info('Processing step 2');
|
|
$task->info('Logging test complete');
|
|
|
|
return [
|
|
'success' => true,
|
|
'log_count' => 5,
|
|
];
|
|
}
|
|
}
|