@@ -15,13 +15,16 @@ class WorkflowTestFunctional extends TestCase
1515 private $ workflowId ;
1616 private $ mindeeClient ;
1717 private $ inputSource ;
18+ private $ predictionType ;
1819
1920 protected function setUp (): void
2021 {
22+ $ rootPath = (getenv ('GITHUB_WORKSPACE ' ) ?: ". " );
2123 $ this ->mindeeClient = new Client ();
2224 $ this ->workflowId = getenv ('WORKFLOW_ID ' ) ?: '' ;
25+ $ this ->predictionType = FinancialDocumentV1::class;
2326 $ this ->inputSource = $ this ->mindeeClient ->sourceFromPath (
24- ( getenv ( ' GITHUB_WORKSPACE ' ) ?: " . " ) . "/tests/resources/products/financial_document/default_sample.jpg "
27+ $ rootPath . "/tests/resources/products/financial_document/default_sample.jpg "
2528 );
2629 }
2730
@@ -34,7 +37,9 @@ public function testWorkflow() {
3437 null ,
3538 true
3639 );
37- $ response = $ this ->mindeeClient ->executeWorkflow ($ this ->inputSource , $ this ->workflowId , $ options );
40+ $ response = $ this ->mindeeClient ->executeWorkflow (
41+ $ this ->inputSource , $ this ->workflowId , $ options
42+ );
3843 $ this ->assertEquals (202 , $ response ->apiRequest ->statusCode );
3944 $ this ->assertEquals ("php- $ currentDateTime " , $ response ->execution ->file ->alias );
4045 $ this ->assertEquals ("low " , $ response ->execution ->priority );
@@ -44,7 +49,7 @@ public function testWorkflowPollingWithRAG() {
4449 $ options = new PredictMethodOptions ();
4550 $ options ->setRAG (true )->setWorkflowId ($ this ->workflowId );
4651 $ response = $ this ->mindeeClient ->enqueueAndParse (
47- FinancialDocumentV1::class ,
52+ $ this -> predictionType ,
4853 $ this ->inputSource ,
4954 $ options
5055 );
@@ -57,7 +62,7 @@ public function testWorkflowPollingWithoutRAG() {
5762 $ options = new PredictMethodOptions ();
5863 $ options ->setWorkflowId ($ this ->workflowId );
5964 $ response = $ this ->mindeeClient ->enqueueAndParse (
60- FinancialDocumentV1::class ,
65+ $ this -> predictionType ,
6166 $ this ->inputSource ,
6267 $ options
6368 );
0 commit comments