-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Labels
BugSomething isn't workingSomething isn't working
Description
Hello, I want to test UpdateMethod in workflow. But I get an error:
AssertionError: assert($result !== null)
/var/www/html/vendor/temporal/sdk/src/Client/Update/UpdateHandle.php:128
/var/www/html/vendor/temporal/sdk/src/Client/Update/UpdateHandle.php:89
/var/www/html/vendor/temporal/sdk/src/Client/Update/UpdateHandle.php:75
/var/www/html/vendor/temporal/sdk/src/Internal/Client/WorkflowProxy.php:112
/var/www/html/tests/Workflows/UploadFileWorkflowTest.php:83
At the same time, the signal and jquery tests are working fine.
Here is the test code:
public function testCanSaveFileData(): void
{
$this->testService->lockTimeSkipping();
$arguments = [
'path' => $this->faker()->filePath(),
'original_name' => $this->faker()->word(),
'extension' => $this->faker()->fileExtension(),
'size' => $this->faker()->numberBetween(),
'is_image' => $this->faker()->boolean(),
];
$file = File::factory()->make($arguments);
$workflow = $this->workflowClient->newWorkflowStub(UploadFileWorkflow::class);
$run = $this->workflowClient->start($workflow);
$this->assertEquals(WorkflowExecutionStatus::Running, $run->describe()->info->status);
$result = $workflow->saveTempFileData(new SaveFileDataArguments($arguments));
$this->assertEquals($file->id, $run->describe()->info->searchAttributes->getValue('FileId'));
$this->assertEquals($file->toArray(), $result['data']);
$this->testService->unlockTimeSkipping();
}I tried calling UpdateMethod via update and startUpdate. the result is exactly the same
Metadata
Metadata
Assignees
Labels
BugSomething isn't workingSomething isn't working