This repository has been archived by the owner on Jun 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 346
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
92 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?php | ||
namespace DTS\eBaySDK\Types\Test; | ||
|
||
use DTS\eBaySDK as Sdk; | ||
/** | ||
* These tests are to cover where we have corrected | ||
* the property names of various classes. | ||
* These names have been incorrectly named in the documentation. | ||
* The names used for the properties are now taken from the actual response from the API. | ||
*/ | ||
class PropertyFixesTest extends \PHPUnit_Framework_TestCase | ||
{ | ||
/** | ||
* Incorrect documentation https://developer.ebay.com/Devzone/post-order/types/CancelSummary.html | ||
* Example of correct property names returned in the API https://developer.ebay.com/Devzone/post-order/post-order_v2_cancellation_search__get.html#Output | ||
*/ | ||
public function testCancelSummary() | ||
{ | ||
$obj = new Sdk\PostOrder\Types\CancelSummary(); | ||
|
||
$this->assertEquals(null, $obj->cancelState); | ||
$this->assertEquals(null, $obj->cancelStatus); | ||
} | ||
|
||
/** | ||
* Incorrect documentation https://developer.ebay.com/Devzone/post-order/types/ItemEligibilityResult.html | ||
* Example of correct property names returned in the API https://developer.ebay.com/Devzone/post-order/post-order_v2_cancellation__post.html#Samples | ||
*/ | ||
public function testItemEligibilityResult() | ||
{ | ||
$obj = new Sdk\PostOrder\Types\ItemEligibilityResult(); | ||
|
||
$obj->itemId = '123'; | ||
$this->assertInternalType('string', $obj->itemId); | ||
|
||
$obj->transactionId = '123'; | ||
$this->assertInternalType('string', $obj->transactionId); | ||
} | ||
|
||
public function testError() | ||
{ | ||
$obj = new Sdk\PostOrder\Types\Error(); | ||
|
||
$obj->subdomain = '123'; | ||
$this->assertInternalType('string', $obj->subdomain); | ||
} | ||
|
||
public function testDeliveryCost() | ||
{ | ||
$obj = new Sdk\Fulfillment\Types\DeliveryCost(); | ||
|
||
$obj->discountAmount = new Sdk\Fulfillment\Types\Amount(); | ||
$this->assertInstanceOf('\DTS\eBaySDK\Fulfillment\Types\Amount', $obj->discountAmount); | ||
} | ||
} |