22 'resourcePath' =>
'/V1/testmodule1/' . $itemId,
26 'service' =>
'testModule1AllSoapAndRestV1',
27 'operation' =>
'testModule1AllSoapAndRestV1Item',
32 $this->assertEquals(
'testProduct1',
$item[
'name'],
"Item was retrieved unsuccessfully");
35 public function testDisabledIntegrationAuthorizationException()
40 'resourcePath' =>
'/V1/testmodule1/' . $itemId,
44 'service' =>
'testModule1AllSoapAndRestV1',
45 'operation' =>
'testModule1AllSoapAndRestV1Item',
51 $credentials = \Magento\TestFramework\Authentication\OauthHelper::getApiAccessCredentials();
59 }
catch (\Exception $e) {
72 'service' =>
'testModule3ErrorV1',
73 'operation' =>
'testModule3ErrorV1ServiceException',
76 $this->expectException(
'SoapFault');
77 $this->expectExceptionMessage(
'Generic service exception');
81 public function testRestNoAcceptHeader()
86 \
Magento\TestFramework\TestCase\Webapi\Adapter\Rest\RestClient::class
88 $response = $curlClient->get(
'/V1/testmodule1/resource1/1', [], [
'Accept:']);
89 $this->assertEquals(
'testProduct1',
$response[
'name'],
"Empty Accept header failed to return response.");
testBasicRoutingExplicitPath()
testExceptionSoapInternalError()
_markTestAsRestOnly($message=null)
_webApiCall( $serviceInfo, $arguments=[], $webApiAdapterCode=null, $storeCode=null, $integration=null)
assertUnauthorizedException($serviceInfo, $requestData=null)
_markTestAsSoapOnly($message=null)
static getObjectManager()