|
|
@@ -58,9 +58,7 @@ class BaseRestOperationTest extends TestCase
|
|
|
->with('PUT', 'entity/1', [], ['json' => '{"a":1}'])
|
|
|
->willReturn($responseOk);
|
|
|
|
|
|
- $operation->setApiRequestService($this->apiRequestService);
|
|
|
-
|
|
|
- $operation->execute();
|
|
|
+ $operation->execute($this->apiRequestService);
|
|
|
$this->assertEquals(BaseRestOperation::STATUS_DONE, $operation->getStatus());
|
|
|
$this->assertEquals("", $operation->getErrorMessage());
|
|
|
}
|
|
|
@@ -84,9 +82,7 @@ class BaseRestOperationTest extends TestCase
|
|
|
->with('PUT', 'entity/2')
|
|
|
->willReturn($responseError);
|
|
|
|
|
|
- $operation->setApiRequestService($this->apiRequestService);
|
|
|
-
|
|
|
- $operation->execute();
|
|
|
+ $operation->execute($this->apiRequestService);
|
|
|
$this->assertEquals(BaseRestOperation::STATUS_ERROR, $operation->getStatus());
|
|
|
$this->assertEquals('Error 404 : Not found', $operation->getErrorMessage());
|
|
|
}
|
|
|
@@ -114,9 +110,7 @@ class BaseRestOperationTest extends TestCase
|
|
|
->with('PUT', 'entity/3')
|
|
|
->willThrowException(new ClientException($responseException));
|
|
|
|
|
|
- $operation->setApiRequestService($this->apiRequestService);
|
|
|
-
|
|
|
- $operation->execute();
|
|
|
+ $operation->execute($this->apiRequestService);
|
|
|
$this->assertEquals(BaseRestOperation::STATUS_ERROR, $operation->getStatus());
|
|
|
$this->assertMatchesRegularExpression(
|
|
|
'/.*ClientException: HTTP 500 returned for "entity\/3".*/',
|