|
| setUp () |
|
| tearDown () |
|
| _webApiCall ( $serviceInfo, $arguments=[], $webApiAdapterCode=null, $storeCode=null, $integration=null) |
|
| _markTestAsSoapOnly ($message=null) |
|
| _markTestAsRestOnly ($message=null) |
|
| _getWebApiAdapter ($webApiAdapterCode) |
|
| _assertMessagesEqual ($expectedMessages, $receivedMessages) |
|
| _cleanAppConfigCache () |
|
| _restoreAppConfig () |
|
| checkSoapFault ( $soapFault, $expectedMessage, $expectedFaultCode, $expectedErrorParams=[], $expectedWrappedErrors=[], $traceString=null) |
|
| _checkFaultParams ($expectedErrorParams, $errorDetails) |
|
| _checkWrappedErrors ($expectedWrappedErrors, $errorDetails) |
|
Test REST schema generation mechanisms.
Definition at line 16 of file JsonGenerationFromDataObjectTest.php.
◆ checkActualData()
checkActualData |
( |
|
$expected, |
|
|
|
$actual |
|
) |
| |
◆ getExpectedCommonData()
getExpectedCommonData |
( |
| ) |
|
Definition at line 137 of file JsonGenerationFromDataObjectTest.php.
139 $versionParts = explode(
'.', $this->productMetadata->getVersion());
140 if (!isset($versionParts[0]) || !isset($versionParts[1])) {
143 $majorMinorVersion = $versionParts[0] .
'.' . $versionParts[1];
144 $url = str_replace(
'://',
'', strstr($this->baseUrl,
'://'));
145 $host = strpos(
$url,
'/') ? strstr(
$url,
'/',
true) :
$url;
146 $basePath = strstr(rtrim(
$url,
'/'),
'/');
147 $basePath = $basePath ? trim($basePath,
'/') .
'/' :
'';
152 'version' => $majorMinorVersion,
153 'title' => $this->productMetadata->getName() .
' ' .$this->productMetadata->getEdition(),
156 'basePath' => $basePath,
◆ getExpectedMultiServiceData()
getExpectedMultiServiceData |
( |
| ) |
|
- Returns
- array @SuppressWarnings(PHPMD.ExcessiveMethodLength)
Definition at line 164 of file JsonGenerationFromDataObjectTest.php.
169 'name' =>
'testModule5AllSoapAndRestV1',
170 'description' =>
'Both SOAP and REST Version ONE',
173 'name' =>
'testModule5AllSoapAndRestV2',
174 'description' =>
'Both SOAP and REST Version TWO',
178 '/V1/TestModule5/{parentId}/nestedResource/{entityId}' => [
181 'testModule5AllSoapAndRestV1',
183 'description' =>
'Update existing item.',
184 'operationId' =>
'testModule5AllSoapAndRestV1NestedUpdatePut',
187 'name' =>
'parentId',
193 'name' =>
'entityId',
199 'name' =>
'testModule5AllSoapAndRestV1NestedUpdatePutBody',
207 '$ref' =>
'#/definitions/test-module5-v1-entity-all-soap-and-rest',
216 'description' =>
'200 Success.',
218 '$ref' =>
'#/definitions/test-module5-v1-entity-all-soap-and-rest',
222 'description' =>
'401 Unauthorized',
224 '$ref' =>
'#/definitions/error-response',
228 'description' =>
'Unexpected error',
230 '$ref' =>
'#/definitions/error-response',
238 'framework-attribute-interface' => [
240 'description' =>
'Interface for custom attribute value.',
242 'attribute_code' => [
244 'description' =>
'Attribute code',
248 'description' =>
'Attribute value',
256 'test-module5-v1-entity-all-soap-and-rest' => [
258 'description' =>
'Some Data Object short description. Data Object long multi line description.',
262 'description' =>
'Item ID',
266 'description' =>
'Item name',
270 'description' =>
'If entity is enabled',
274 'description' =>
'If current entity has a property defined',
276 'custom_attributes' => [
278 'description' =>
'Custom attributes values.',
280 '$ref' =>
'#/definitions/framework-attribute-interface',
◆ getExpectedSingleServiceData()
getExpectedSingleServiceData |
( |
| ) |
|
- Returns
- array @SuppressWarnings(PHPMD.ExcessiveMethodLength)
Definition at line 299 of file JsonGenerationFromDataObjectTest.php.
304 'name' =>
'testModule5AllSoapAndRestV2',
305 'description' =>
'Both SOAP and REST Version TWO',
309 '/V2/TestModule5/{id}' => [
312 'testModule5AllSoapAndRestV2',
314 'description' =>
'Delete existing item.',
315 'operationId' =>
'testModule5AllSoapAndRestV2DeleteDelete',
326 'description' =>
'200 Success.',
328 '$ref' =>
'#/definitions/test-module5-v2-entity-all-soap-and-rest',
332 'description' =>
'401 Unauthorized',
334 '$ref' =>
'#/definitions/error-response',
338 'description' =>
'Unexpected error',
340 '$ref' =>
'#/definitions/error-response',
348 'test-module5-v2-entity-all-soap-and-rest' => [
350 'description' =>
'Some Data Object short description. Data Object long multi line description.',
◆ setUp()
◆ testInvalidRestUrlInvalidServiceName()
testInvalidRestUrlInvalidServiceName |
( |
| ) |
|
@expectedException \Exception @expectedExceptionMessage Incorrect format of request URI or Requested services are missing.
Definition at line 101 of file JsonGenerationFromDataObjectTest.php.
103 $this->isSingleService =
false;
105 $resourcePath =
'/schema?services=invalidServiceName';
109 'resourcePath' => $resourcePath,
_webApiCall( $serviceInfo, $arguments=[], $webApiAdapterCode=null, $storeCode=null, $integration=null)
◆ testInvalidRestUrlNoServices()
testInvalidRestUrlNoServices |
( |
| ) |
|
@expectedException \Exception @expectedExceptionMessage Specified request cannot be processed.
Definition at line 83 of file JsonGenerationFromDataObjectTest.php.
89 'resourcePath' => $resourcePath,
_webApiCall( $serviceInfo, $arguments=[], $webApiAdapterCode=null, $storeCode=null, $integration=null)
◆ testMultiServiceRetrieval()
testMultiServiceRetrieval |
( |
| ) |
|
Definition at line 44 of file JsonGenerationFromDataObjectTest.php.
46 $this->isSingleService =
false;
48 $resourcePath =
'/schema?services=testModule5AllSoapAndRestV1,testModule5AllSoapAndRestV2';
52 'resourcePath' => $resourcePath,
_webApiCall( $serviceInfo, $arguments=[], $webApiAdapterCode=null, $storeCode=null, $integration=null)
checkActualData($expected, $actual)
getExpectedMultiServiceData()
◆ testSingleServiceRetrieval()
testSingleServiceRetrieval |
( |
| ) |
|
Definition at line 61 of file JsonGenerationFromDataObjectTest.php.
63 $this->isSingleService =
false;
65 $resourcePath =
'/schema?services=testModule5AllSoapAndRestV2';
69 'resourcePath' => $resourcePath,
_webApiCall( $serviceInfo, $arguments=[], $webApiAdapterCode=null, $storeCode=null, $integration=null)
checkActualData($expected, $actual)
getExpectedSingleServiceData()
◆ $baseUrl
$baseUrl = TESTS_BASE_URL |
|
protected |
◆ $isSingleService
◆ $productMetadata
◆ $storeCode
The documentation for this class was generated from the following file: