Skip to content

Commit

Permalink
Add more tests from roadrunner-temporal package
Browse files Browse the repository at this point in the history
  • Loading branch information
roxblnfk committed Oct 4, 2023
1 parent 3b0e51c commit 20b0212
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/Functional/Client/TypedStubTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

namespace Temporal\Tests\Functional\Client;

use Temporal\Exception\Client\WorkflowQueryException;
use Temporal\Exception\InvalidArgumentException;
use Temporal\Tests\DTO\Message;
use Temporal\Tests\DTO\User;
Expand Down Expand Up @@ -90,6 +91,26 @@ public function testQueryWorkflow()
$this->assertSame(88, $e->getResult());
}

public function testQueryNotExistingMethod()
{
$client = $this->createClient();
$simple = $client->newUntypedWorkflowStub('QueryWorkflow');


$e = $client->start($simple, 'Hello World');
$this->assertNotEmpty($e->getExecution()->getID());
$this->assertNotEmpty($e->getExecution()->getRunID());

try {
$simple->query('error', -1);
} catch (WorkflowQueryException $e) {
$this->assertStringContainsString('KnownQueryTypes=[get]', $e->getPrevious()->getMessage());
return;
}

$this->fail('Expected exception to be thrown');
}

public function testGetDTOResult()
{
$w = $this->createClient();
Expand Down

0 comments on commit 20b0212

Please sign in to comment.