fix: DockerSecretsResolver - don't normalize absolute paths like /var/www/html/...
Some checks failed
Deploy Application / deploy (push) Has been cancelled

This commit is contained in:
2025-11-24 21:28:25 +01:00
parent 4eb7134853
commit 77abc65cd7
1327 changed files with 91915 additions and 9909 deletions

View File

@@ -0,0 +1,127 @@
<?php
declare(strict_types=1);
namespace Tests\Unit\Framework\LiveComponents\Security;
use App\Application\LiveComponents\Counter\CounterState;
use App\Framework\LiveComponents\Attributes\Action;
use App\Framework\LiveComponents\Contracts\LiveComponentContract;
use App\Framework\LiveComponents\ValueObjects\ComponentId;
use App\Framework\LiveComponents\ValueObjects\ComponentRenderData;
/**
* Test Component with valid action
*/
final class ValidActionComponent implements LiveComponentContract
{
public function __construct(
public ComponentId $id,
public CounterState $state
) {
}
public function getRenderData(): ComponentRenderData
{
return new ComponentRenderData(templatePath: 'test', data: []);
}
#[Action]
public function validAction(): CounterState
{
return $this->state;
}
}
/**
* Test Component with private action (should fail validation)
*/
final class PrivateActionComponent implements LiveComponentContract
{
public function __construct(
public ComponentId $id,
public CounterState $state
) {
}
public function getRenderData(): ComponentRenderData
{
return new ComponentRenderData(templatePath: 'test', data: []);
}
#[Action]
private function privateAction(): CounterState
{
return $this->state;
}
}
/**
* Test Component with static action (should fail validation)
*/
final class StaticActionComponent implements LiveComponentContract
{
public function __construct(
public ComponentId $id,
public CounterState $state
) {
}
public function getRenderData(): ComponentRenderData
{
return new ComponentRenderData(templatePath: 'test', data: []);
}
#[Action]
public static function staticAction(): CounterState
{
return CounterState::empty();
}
}
/**
* Test Component with primitive return type (should fail validation)
*/
final class PrimitiveReturnTypeComponent implements LiveComponentContract
{
public function __construct(
public ComponentId $id,
public CounterState $state
) {
}
public function getRenderData(): ComponentRenderData
{
return new ComponentRenderData(templatePath: 'test', data: []);
}
#[Action]
public function intAction(): int
{
return 42;
}
}
/**
* Test Component with array return type (should fail validation)
*/
final class ArrayReturnTypeComponent implements LiveComponentContract
{
public function __construct(
public ComponentId $id,
public CounterState $state
) {
}
public function getRenderData(): ComponentRenderData
{
return new ComponentRenderData(templatePath: 'test', data: []);
}
#[Action]
public function arrayAction(): array
{
return [];
}
}