You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
424 B
19 lines
424 B
<?php
|
|
|
|
namespace Tests\Unit\UI\Actions;
|
|
|
|
use App\UI\Actions\ResolveDynamicText;
|
|
use Tests\TestCase;
|
|
|
|
uses(TestCase::class);
|
|
|
|
test('it resolves dynamic text placeholders', function () {
|
|
$action = new ResolveDynamicText();
|
|
|
|
$component = new class {
|
|
public $user = ['name' => 'John'];
|
|
};
|
|
|
|
$result = $action->execute('Hello {user.name}', $component, 'user');
|
|
expect($result)->toBe('Hello John');
|
|
});
|
|
|