diff --git a/README.md b/README.md index d5871c0..acf2c2c 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,22 @@ The Lob API is organized around REST. Our API is designed to have predictable, r For more information, please visit [https://support.lob.com/](https://support.lob.com/). -## Installation & Usage - -### Requirements +## Requirements PHP 7.3 and later. Should also work with PHP 8.0 but has not been tested. -### Composer +## Getting Started + +### Registration + +First, you will need to first create an account at [Lob.com](https://dashboard.lob.com/#/register) and obtain your Test and Live API Keys. + +Once you have created an account, you can access your API Keys from the [Settings Panel](https://dashboard.lob.com/#/settings). + +### Installation & Usage + +#### Composer To install the bindings via [Composer](https://getcomposer.org/), run `php composer.phar install` @@ -25,9 +33,7 @@ Download the files and include `autoload.php`: require_once('/path/to/OpenAPIClient-php/vendor/autoload.php'); ``` -## Getting Started - -Please follow the [installation procedure](#installation--usage) and then run the following: +## First API Call ```php > LOB_API_LIVE_KEY=<> vendor/bin/phpunit --group integration --coverage-text --coverage-html coverage/html ``` -To run the tests, use: +#### A cleaner alternative if you are going to run integration tests frequently + +Run this the first time: ```bash -vendor/bin/phpunit +$ echo "LOB_API_TEST_KEY=<> LOB_API_LIVE_KEY=<>" > LOCAL.env ``` +Then, to run the integration tests: +```bash +$ env $(cat LOCAL.env) vendor/bin/phpunit --group integration --coverage-text --coverage-html coverage/html +``` ## Author lob-openapi@lob.com diff --git a/test/Integration/AddressesApiSpecTest.php b/test/Integration/AddressesApiSpecTest.php index 6a18960..d77d87b 100644 --- a/test/Integration/AddressesApiSpecTest.php +++ b/test/Integration/AddressesApiSpecTest.php @@ -112,6 +112,10 @@ public function tearDown(): void } } + /** + * @group integration + * @group addresses + */ public function testAddressesApiInstantiation200() { try { $addressApi200 = new AddressesApi(self::$config); @@ -121,6 +125,10 @@ public function testAddressesApiInstantiation200() { } } + /** + * @group integration + * @group addresses + */ public function testCreate200() { try { @@ -132,10 +140,14 @@ public function testCreate200() } } + /** + * @group integration + * @group addresses + */ // does not include required field in request public function testCreate422() { - + try { $this->expectException(ApiException::class); $this->expectExceptionMessageMatches("/address_line1 is required/"); @@ -145,6 +157,10 @@ public function testCreate422() } } + /** + * @group integration + * @group addresses + */ // uses a bad key to attempt to send a request public function testAddressApi401() { try { @@ -160,6 +176,10 @@ public function testAddressApi401() { } } + /** + * @group integration + * @group addresses + */ public function testGet200() { try { @@ -172,6 +192,10 @@ public function testGet200() } } + /** + * @group integration + * @group addresses + */ public function testGet404() { try { @@ -183,6 +207,10 @@ public function testGet404() } } + /** + * @group integration + * @group addresses + */ public function testList200() { $nextUrl = ""; @@ -240,6 +268,10 @@ public function testList200() } } + /** + * @group integration + * @group addresses + */ public function testDelete200() { try { @@ -252,6 +284,10 @@ public function testDelete200() } } + /** + * @group integration + * @group addresses + */ public function testDelete404() { try { diff --git a/test/Integration/BankAccountsApiSpecTest.php b/test/Integration/BankAccountsApiSpecTest.php index 0fed382..794bed8 100644 --- a/test/Integration/BankAccountsApiSpecTest.php +++ b/test/Integration/BankAccountsApiSpecTest.php @@ -112,6 +112,10 @@ public function tearDown(): void } } + /** + * @group integration + * @group bankAccounts + */ public function testBankAccountsApiInstantiation200() { try { $baApi200 = new BankAccountsApi(self::$config); @@ -121,6 +125,10 @@ public function testBankAccountsApiInstantiation200() { } } + /** + * @group integration + * @group bankAccounts + */ public function testCreate200() { try { @@ -132,6 +140,10 @@ public function testCreate200() } } + /** + * @group integration + * @group bankAccounts + */ // does not include required field in request public function testCreate422() { @@ -144,6 +156,10 @@ public function testCreate422() } } + /** + * @group integration + * @group bankAccounts + */ // uses a bad key to attempt to send a request public function testBankAccountApi401() { try { @@ -159,6 +175,10 @@ public function testBankAccountApi401() { } } + /** + * @group integration + * @group bankAccounts + */ public function testVerify422() { try { @@ -174,6 +194,10 @@ public function testVerify422() } } + /** + * @group integration + * @group bankAccounts + */ public function testGet200() { try { @@ -186,6 +210,10 @@ public function testGet200() } } + /** + * @group integration + * @group bankAccounts + */ public function testGet404() { try { @@ -197,6 +225,10 @@ public function testGet404() } } + /** + * @group integration + * @group bankAccounts + */ public function testList200() { $nextUrl = ""; @@ -254,6 +286,10 @@ public function testList200() } } + /** + * @group integration + * @group bankAccounts + */ public function testDelete200() { try { @@ -266,6 +302,10 @@ public function testDelete200() } } + /** + * @group integration + * @group bankAccounts + */ public function testDelete404() { try { diff --git a/test/Integration/BillingGroupsApiSpecTest.php b/test/Integration/BillingGroupsApiSpecTest.php index 0c23b7a..c6345f1 100644 --- a/test/Integration/BillingGroupsApiSpecTest.php +++ b/test/Integration/BillingGroupsApiSpecTest.php @@ -94,6 +94,10 @@ public function testBillingGroupsApiInstantiation200() { } } + /** + * @group integration + * @group billingGroups + */ public function testCreate200() { try { @@ -104,10 +108,14 @@ public function testCreate200() } } + /** + * @group integration + * @group billingGroups + */ // does not include required field in request public function testCreate422() { - + try { $this->expectException(ApiException::class); $this->expectExceptionMessageMatches("/name is required/"); @@ -117,6 +125,10 @@ public function testCreate422() } } + /** + * @group integration + * @group billingGroups + */ // uses a bad key to attempt to send a request public function testBillingGroupApi401() { try { @@ -132,6 +144,10 @@ public function testBillingGroupApi401() { } } + /** + * @group integration + * @group billingGroups + */ public function testGet200() { try { @@ -143,6 +159,10 @@ public function testGet200() } } + /** + * @group integration + * @group billingGroups + */ public function testGet404() { try { @@ -154,6 +174,10 @@ public function testGet404() } } + /** + * @group integration + * @group billingGroups + */ public function testUpdate200() { try { @@ -167,6 +191,10 @@ public function testUpdate200() } } + /** + * @group integration + * @group billingGroups + */ // commented out some parts of this test because of a bug in the billijng groups endpoint public function testList200() { diff --git a/test/Integration/CardOrdersApiSpecTest.php b/test/Integration/CardOrdersApiSpecTest.php index 0d4d8a2..a804105 100644 --- a/test/Integration/CardOrdersApiSpecTest.php +++ b/test/Integration/CardOrdersApiSpecTest.php @@ -71,7 +71,7 @@ public static function setUpBeforeClass(): void self::$config = new Configuration(); self::$config->setApiKey('basic', getenv('LOB_API_TEST_KEY')); self::$cardOrdersApi = new CardOrdersApi(self::$config); - + // create a card which the card orders will be affiliated with self::$cardApi = new CardsApi(self::$config); $editableCard = new CardEditable(); @@ -102,6 +102,10 @@ public static function tearDownAfterClass(): void self::$cardApi->delete(self::$cardId); } + /** + * @group integration + * @group cardOrders + */ public function testCardOrdersApiInstantiation200() { try { $cardOrdersApi200 = new CardOrdersApi(self::$config); @@ -111,6 +115,10 @@ public function testCardOrdersApiInstantiation200() { } } + /** + * @group integration + * @group cardOrders + */ public function testCreate200() { try { @@ -122,10 +130,14 @@ public function testCreate200() } } + /** + * @group integration + * @group cardOrders + */ // does not include required field in request public function testCreate422() { - + try { $this->expectException(ApiException::class); $this->expectExceptionMessageMatches("/Number of cards in order must be at least 10000/"); @@ -135,6 +147,10 @@ public function testCreate422() } } + /** + * @group integration + * @group cardOrders + */ // uses a bad key to attempt to send a request public function testCardOrdersApi401() { try { @@ -150,6 +166,10 @@ public function testCardOrdersApi401() { } } + /** + * @group integration + * @group cardOrders + */ public function testRetrieve200() { $this->markTestSkipped("Cannot properly test this until the SDK is regenerated and all bugs are solved"); diff --git a/test/Integration/CardsApiSpecTest.php b/test/Integration/CardsApiSpecTest.php index c5f1609..0a9a838 100644 --- a/test/Integration/CardsApiSpecTest.php +++ b/test/Integration/CardsApiSpecTest.php @@ -100,6 +100,10 @@ public function tearDown(): void } } + /** + * @group integration + * @group cards + */ public function testCardsApiInstantiation200() { try { $cardApi200 = new CardsApi(self::$config); @@ -109,6 +113,10 @@ public function testCardsApiInstantiation200() { } } + /** + * @group integration + * @group cards + */ public function testCreate200() { try { @@ -120,10 +128,14 @@ public function testCreate200() } } + /** + * @group integration + * @group cards + */ // does not include required field in request public function testCreate422() { - + try { $this->expectException(ApiException::class); $this->expectExceptionMessageMatches("/front is required/"); @@ -133,6 +145,10 @@ public function testCreate422() } } + /** + * @group integration + * @group cards + */ // uses a bad key to attempt to send a request public function testCardApi401() { try { @@ -148,6 +164,10 @@ public function testCardApi401() { } } + /** + * @group integration + * @group cards + */ public function testGet200() { try { @@ -160,6 +180,10 @@ public function testGet200() } } + /** + * @group integration + * @group cards + */ public function testGet404() { try { @@ -171,6 +195,10 @@ public function testGet404() } } + /** + * @group integration + * @group cards + */ public function testUpdate200() { try { @@ -185,6 +213,10 @@ public function testUpdate200() } } + /** + * @group integration + * @group cards + */ public function testList200() { $nextUrl = ""; @@ -242,6 +274,10 @@ public function testList200() } } + /** + * @group integration + * @group cards + */ public function testDelete200() { try { @@ -254,6 +290,10 @@ public function testDelete200() } } + /** + * @group integration + * @group cards + */ public function testDelete404() { try { diff --git a/test/Integration/ChecksApiSpecTest.php b/test/Integration/ChecksApiSpecTest.php index 093c310..55dbafe 100644 --- a/test/Integration/ChecksApiSpecTest.php +++ b/test/Integration/ChecksApiSpecTest.php @@ -176,6 +176,10 @@ public static function tearDownAfterClass(): void { // include static cleanup for all the addresses? + /** + * @group integration + * @group checks + */ public function testChecksApiInstantiation200() { try { $checksApi200 = new ChecksApi(self::$config); @@ -185,6 +189,10 @@ public function testChecksApiInstantiation200() { } } + /** + * @group integration + * @group checks + */ public function testCreate200() { try { @@ -196,6 +204,10 @@ public function testCreate200() } } + /** + * @group integration + * @group checks + */ // does not include required field in request public function testCreate422() { @@ -208,6 +220,10 @@ public function testCreate422() } } + /** + * @group integration + * @group checks + */ // uses a bad key to attempt to send a request public function testCheckApi401() { try { @@ -223,6 +239,10 @@ public function testCheckApi401() { } } + /** + * @group integration + * @group checks + */ public function testGet200() { try { @@ -235,6 +255,10 @@ public function testGet200() } } + /** + * @group integration + * @group checks + */ public function testGet404() { try { @@ -246,6 +270,10 @@ public function testGet404() } } + /** + * @group integration + * @group checks + */ public function testList200() { $nextUrl = ""; @@ -297,6 +325,10 @@ public function testList200() } } + /** + * @group integration + * @group checks + */ public function testCancel200() { try { @@ -308,6 +340,10 @@ public function testCancel200() } } + /** + * @group integration + * @group checks + */ public function testCancel404() { try { diff --git a/test/Integration/IntlAutocompletionsApiSpecTest.php b/test/Integration/IntlAutocompletionsApiSpecTest.php index 352d4d3..3a1b3ea 100644 --- a/test/Integration/IntlAutocompletionsApiSpecTest.php +++ b/test/Integration/IntlAutocompletionsApiSpecTest.php @@ -68,6 +68,10 @@ public static function setUpBeforeClass(): void self::$autocompletionWritable->setCountry("GB"); } + /** + * @group integration + * @group intlAutocompletions + */ public function testIntlAutocompletionsApiInstantiation200() { try { $intlAutocompletionApi = new IntlAutocompletionsApi(self::$config); @@ -77,6 +81,10 @@ public function testIntlAutocompletionsApiInstantiation200() { } } + /** + * @group integration + * @group intlAutocompletions + */ public function testIntlAutocompletion() { try { @@ -88,6 +96,10 @@ public function testIntlAutocompletion() } } + /** + * @group integration + * @group intlAutocompletions + */ public function testIntlAutocompletionTestKey() { try { @@ -108,6 +120,10 @@ public function testIntlAutocompletionTestKey() } } + /** + * @group integration + * @group intlAutocompletions + */ public function testIntlAutocompletionError() { try { diff --git a/test/Integration/IntlVerificationsApiSpecTest.php b/test/Integration/IntlVerificationsApiSpecTest.php index 0b21f82..9eb33e4 100644 --- a/test/Integration/IntlVerificationsApiSpecTest.php +++ b/test/Integration/IntlVerificationsApiSpecTest.php @@ -100,6 +100,10 @@ public static function setUpBeforeClass(): void self::$undeliverableAddress->setCountry("GB"); } + /** + * @group integration + * @group intlVerifications + */ public function testIntlVerificationsApiInstantiation200() { try { $intlvApi200 = new IntlVerificationsApi(self::$config); @@ -109,6 +113,10 @@ public function testIntlVerificationsApiInstantiation200() { } } + /** + * @group integration + * @group intlVerifications + */ public function testSingleUsVerificationDeliverable() { try { @@ -120,6 +128,10 @@ public function testSingleUsVerificationDeliverable() } } + /** + * @group integration + * @group intlVerifications + */ public function testSingleUsVerificationUndeliverable() { try { @@ -132,6 +144,10 @@ public function testSingleUsVerificationUndeliverable() } } + /** + * @group integration + * @group intlVerifications + */ public function testBulkUsVerificationValid() { try { @@ -144,6 +160,10 @@ public function testBulkUsVerificationValid() } } + /** + * @group integration + * @group intlVerifications + */ public function testBulkUsVerificationError() { try { @@ -151,15 +171,15 @@ public function testBulkUsVerificationError() $mc1->setPrimaryLine("10 DOWNING ST"); $mc1->setCity("LONDON"); $mc1->setPostalCode("SW1A 2AA"); - $mc1->setCountry("GB"); - + $mc1->setCountry("GB"); + // second entry has nonexistent country, should error $mc2 = new MultipleComponentsIntl(); $mc2->setPrimaryLine("35 TOWER HILL"); $mc2->setCity("LONDON"); $mc2->setPostalCode("EC3N 4DR"); $mc2->setCountry("ZZ"); - + // multiple components list for bulk verification test $errorAddressList = new IntlVerificationsPayload(); $errorAddressList->setAddresses([$mc1, $mc2]); diff --git a/test/Integration/LettersApiSpecTest.php b/test/Integration/LettersApiSpecTest.php index 757cdf3..a9ee607 100644 --- a/test/Integration/LettersApiSpecTest.php +++ b/test/Integration/LettersApiSpecTest.php @@ -166,6 +166,10 @@ public static function tearDownAfterClass(): void { // include static cleanup for all the addresses? + /** + * @group integration + * @group letters + */ public function testLettersApiInstantiation200() { try { $lettersApi200 = new LettersApi(self::$config); @@ -175,6 +179,10 @@ public function testLettersApiInstantiation200() { } } + /** + * @group integration + * @group letters + */ public function testCreateRegular200() { try { @@ -186,6 +194,10 @@ public function testCreateRegular200() } } + /** + * @group integration + * @group letters + */ public function testCreateCertified200() { try { @@ -197,6 +209,10 @@ public function testCreateCertified200() } } + /** + * @group integration + * @group letters + */ public function testCreateRegistered200() { try { @@ -208,6 +224,10 @@ public function testCreateRegistered200() } } + /** + * @group integration + * @group letters + */ // does not include required field in request public function testCreate422() { @@ -220,6 +240,10 @@ public function testCreate422() } } + /** + * @group integration + * @group letters + */ // uses a bad key to attempt to send a request public function testLetterApi401() { try { @@ -235,6 +259,10 @@ public function testLetterApi401() { } } + /** + * @group integration + * @group letters + */ public function testGet200() { try { @@ -247,6 +275,10 @@ public function testGet200() } } + /** + * @group integration + * @group letters + */ public function testGet404() { try { @@ -258,6 +290,10 @@ public function testGet404() } } + /** + * @group integration + * @group letters + */ public function testList200() { $nextUrl = ""; @@ -309,6 +345,10 @@ public function testList200() } } + /** + * @group integration + * @group letters + */ public function testCancel200() { try { @@ -320,6 +360,10 @@ public function testCancel200() } } + /** + * @group integration + * @group letters + */ public function testCancel404() { try { diff --git a/test/Integration/PostcardsApiSpecTest.php b/test/Integration/PostcardsApiSpecTest.php index 7c5a598..e8db1af 100644 --- a/test/Integration/PostcardsApiSpecTest.php +++ b/test/Integration/PostcardsApiSpecTest.php @@ -171,6 +171,10 @@ public static function tearDownAfterClass(): void { // include static cleanup for all the addresses? + /** + * @group integration + * @group postcards + */ public function testPostcardsApiInstantiation200() { try { $postcardsApi200 = new PostcardsApi(self::$config); @@ -180,6 +184,10 @@ public function testPostcardsApiInstantiation200() { } } + /** + * @group integration + * @group postcards + */ public function testCreate200() { try { @@ -191,6 +199,10 @@ public function testCreate200() } } + /** + * @group integration + * @group postcards + */ // does not include required field in request public function testCreate422() { @@ -203,6 +215,10 @@ public function testCreate422() } } + /** + * @group integration + * @group postcards + */ // uses incorrect address // TODO: reimplement this once we figure out how to test individual flags (or we change our deliverability strictness) public function testCreateBadAddress() @@ -224,6 +240,10 @@ public function testCreateBadAddress() } } + /** + * @group integration + * @group postcards + */ // uses a bad key to attempt to send a request public function testPostcardApi401() { try { @@ -239,6 +259,10 @@ public function testPostcardApi401() { } } + /** + * @group integration + * @group postcards + */ public function testGet200() { try { @@ -251,6 +275,10 @@ public function testGet200() } } + /** + * @group integration + * @group postcards + */ public function testGet404() { try { @@ -262,6 +290,10 @@ public function testGet404() } } + /** + * @group integration + * @group postcards + */ public function testList200() { $nextUrl = ""; @@ -313,6 +345,10 @@ public function testList200() } } + /** + * @group integration + * @group postcards + */ public function testListSize200() { $nextUrl = ""; @@ -333,6 +369,10 @@ public function testListSize200() } } + /** + * @group integration + * @group postcards + */ public function testListDate200() { $nextUrl = ""; @@ -353,6 +393,10 @@ public function testListDate200() } } + /** + * @group integration + * @group postcards + */ public function testCancel200() { try { @@ -364,6 +408,10 @@ public function testCancel200() } } + /** + * @group integration + * @group postcards + */ public function testCancel404() { try { diff --git a/test/Integration/ReverseGeocodeLookupsApiSpecTest.php b/test/Integration/ReverseGeocodeLookupsApiSpecTest.php index 5aeeaad..21e0f02 100644 --- a/test/Integration/ReverseGeocodeLookupsApiSpecTest.php +++ b/test/Integration/ReverseGeocodeLookupsApiSpecTest.php @@ -68,6 +68,10 @@ public static function setUpBeforeClass(): void $size = 3; } + /** + * @group integration + * @group reverseGeocodeLookups + */ public function testReverseGeocodeLookupsApiInstantiation200() { try { $reverseGeocodeApi = new ReverseGeocodeLookupsApi(self::$config); @@ -77,6 +81,10 @@ public function testReverseGeocodeLookupsApiInstantiation200() { } } + /** + * @group integration + * @group reverseGeocodeLookups + */ public function testLookup() { try { @@ -91,6 +99,10 @@ public function testLookup() } } + /** + * @group integration + * @group reverseGeocodeLookups + */ public function testLookupError() { $location = new Location(); diff --git a/test/Integration/SelfMailersApiSpecTest.php b/test/Integration/SelfMailersApiSpecTest.php index 86f8f4e..78e6003 100644 --- a/test/Integration/SelfMailersApiSpecTest.php +++ b/test/Integration/SelfMailersApiSpecTest.php @@ -151,6 +151,10 @@ public static function tearDownAfterClass(): void { // include static cleanup for all the addresses? + /** + * @group integration + * @group selfMailers + */ public function testSelfMailersApiInstantiation200() { try { $selfMailersApi200 = new SelfMailersApi(self::$config); @@ -160,6 +164,10 @@ public function testSelfMailersApiInstantiation200() { } } + /** + * @group integration + * @group selfMailers + */ public function testCreate200() { try { @@ -171,6 +179,10 @@ public function testCreate200() } } + /** + * @group integration + * @group selfMailers + */ // does not include required field in request public function testCreate422() { @@ -183,6 +195,10 @@ public function testCreate422() } } + /** + * @group integration + * @group selfMailers + */ // uses a bad key to attempt to send a request public function testSelfMailerApi401() { try { @@ -198,6 +214,10 @@ public function testSelfMailerApi401() { } } + /** + * @group integration + * @group selfMailers + */ public function testGet200() { try { @@ -210,6 +230,10 @@ public function testGet200() } } + /** + * @group integration + * @group selfMailers + */ public function testGet404() { try { @@ -221,6 +245,10 @@ public function testGet404() } } + /** + * @group integration + * @group selfMailers + */ public function testList200() { $nextUrl = ""; @@ -272,6 +300,10 @@ public function testList200() } } + /** + * @group integration + * @group selfMailers + */ public function testDelete200() { try { @@ -283,6 +315,10 @@ public function testDelete200() } } + /** + * @group integration + * @group selfMailers + */ public function testDelete404() { try { diff --git a/test/Integration/TemplateVersionsApiSpecTest.php b/test/Integration/TemplateVersionsApiSpecTest.php index 2bb9f86..9d2e991 100644 --- a/test/Integration/TemplateVersionsApiSpecTest.php +++ b/test/Integration/TemplateVersionsApiSpecTest.php @@ -114,7 +114,10 @@ public static function tearDownAfterClass(): void self::$templatesApi->delete(self::$tmplId); } - + /** + * @group integration + * @group templateVersions + */ public function testTemplateVersionsApiInstantiation200() { try { $templateVersionsApi200 = new TemplateVersionsApi(self::$config); @@ -124,6 +127,10 @@ public function testTemplateVersionsApiInstantiation200() { } } + /** + * @group integration + * @group templateVersions + */ public function testCreate200() { try { @@ -135,6 +142,10 @@ public function testCreate200() } } + /** + * @group integration + * @group templateVersions + */ // does not include required field in request public function testCreate422() { @@ -147,6 +158,10 @@ public function testCreate422() } } + /** + * @group integration + * @group templateVersions + */ // uses a bad key to attempt to send a request public function testTemplateVersionsApi401() { try { @@ -162,6 +177,10 @@ public function testTemplateVersionsApi401() { } } + /** + * @group integration + * @group templateVersions + */ public function testGet200() { try { @@ -174,6 +193,10 @@ public function testGet200() } } + /** + * @group integration + * @group templateVersions + */ public function testGet404() { try { @@ -185,6 +208,10 @@ public function testGet404() } } + /** + * @group integration + * @group templateVersions + */ public function testUpdate200() { try { @@ -199,6 +226,10 @@ public function testUpdate200() } } + /** + * @group integration + * @group templateVersions + */ public function testList200() { $nextUrl = ""; @@ -256,6 +287,10 @@ public function testList200() } } + /** + * @group integration + * @group templateVersions + */ public function testDelete200() { try { @@ -268,6 +303,10 @@ public function testDelete200() } } + /** + * @group integration + * @group templateVersions + */ public function testDelete404() { try { diff --git a/test/Integration/TemplatesApiSpecTest.php b/test/Integration/TemplatesApiSpecTest.php index 2927155..9f91050 100644 --- a/test/Integration/TemplatesApiSpecTest.php +++ b/test/Integration/TemplatesApiSpecTest.php @@ -96,6 +96,10 @@ public function tearDown(): void } } + /** + * @group integration + * @group templates + */ public function testTemplatesApiInstantiation200() { try { $templateApi200 = new TemplatesApi(self::$config); @@ -105,6 +109,10 @@ public function testTemplatesApiInstantiation200() { } } + /** + * @group integration + * @group templates + */ public function testCreate200() { try { @@ -116,10 +124,14 @@ public function testCreate200() } } + /** + * @group integration + * @group templates + */ // does not include required field in request public function testCreate422() { - + try { $this->expectException(ApiException::class); $this->expectExceptionMessageMatches("/html is required/"); @@ -144,6 +156,10 @@ public function testTemplateApi401() { } } + /** + * @group integration + * @group templates + */ public function testGet200() { try { @@ -156,6 +172,10 @@ public function testGet200() } } + /** + * @group integration + * @group templates + */ public function testGet404() { try { @@ -167,6 +187,10 @@ public function testGet404() } } + /** + * @group integration + * @group templates + */ public function testUpdate200() { try { @@ -181,6 +205,10 @@ public function testUpdate200() } } + /** + * @group integration + * @group templates + */ public function testList200() { $nextUrl = ""; @@ -238,6 +266,10 @@ public function testList200() } } + /** + * @group integration + * @group templates + */ public function testDelete200() { try { @@ -250,6 +282,10 @@ public function testDelete200() } } + /** + * @group integration + * @group templates + */ public function testDelete404() { try { diff --git a/test/Integration/UsAutocompletionsApiSpecTest.php b/test/Integration/UsAutocompletionsApiSpecTest.php index 20f0ea2..399a6d3 100644 --- a/test/Integration/UsAutocompletionsApiSpecTest.php +++ b/test/Integration/UsAutocompletionsApiSpecTest.php @@ -69,6 +69,10 @@ public static function setUpBeforeClass(): void self::$autocompletionWritable->setGeoIpSort(false); } + /** + * @group integration + * @group usAutocompletions + */ public function testUsAutocompletionsApiInstantiation200() { try { $usAutocompletionApi = new UsAutocompletionsApi(self::$config); @@ -78,6 +82,10 @@ public function testUsAutocompletionsApiInstantiation200() { } } + /** + * @group integration + * @group usAutocompletions + */ public function testUsAutocompletion() { try { @@ -89,6 +97,10 @@ public function testUsAutocompletion() } } + /** + * @group integration + * @group usAutocompletions + */ public function testUsAutocompletionTestKey() { try { @@ -109,6 +121,10 @@ public function testUsAutocompletionTestKey() } } + /** + * @group integration + * @group usAutocompletions + */ public function testUsAutocompletionError() { try { diff --git a/test/Integration/UsVerificationsApiSpecTest.php b/test/Integration/UsVerificationsApiSpecTest.php index 3b86fb0..d708c79 100644 --- a/test/Integration/UsVerificationsApiSpecTest.php +++ b/test/Integration/UsVerificationsApiSpecTest.php @@ -101,6 +101,10 @@ public static function setUpBeforeClass(): void self::$undeliverableAddress->setZipCode("07000"); } + /** + * @group integration + * @group usVerifications + */ public function testUsVerificationsApiInstantiation200() { try { $usvApi200 = new UsVerificationsApi(self::$config); @@ -110,6 +114,10 @@ public function testUsVerificationsApiInstantiation200() { } } + /** + * @group integration + * @group usVerifications + */ public function testSingleUsVerificationDeliverable() { try { @@ -121,6 +129,10 @@ public function testSingleUsVerificationDeliverable() } } + /** + * @group integration + * @group usVerifications + */ public function testSingleUsVerificationUndeliverable() { try { @@ -133,6 +145,10 @@ public function testSingleUsVerificationUndeliverable() } } + /** + * @group integration + * @group usVerifications + */ public function testBulkUsVerificationValid() { try { @@ -145,6 +161,10 @@ public function testBulkUsVerificationValid() } } + /** + * @group integration + * @group usVerifications + */ public function testBulkUsVerificationError() { try { @@ -153,14 +173,14 @@ public function testBulkUsVerificationError() $mc1->setCity("SAN FRANCISCO"); $mc1->setState("CA"); $mc1->setZipCode("94107"); - + // second entry has no primary line, should error $mc2 = new MultipleComponents(); $mc2->setSecondaryLine("SUITE 666"); $mc2->setCity("WESTFIELD"); $mc2->setState("NJ"); $mc2->setZipCode("07000"); - + // multiple components list for bulk verification test $errorAddressList = new MultipleComponentsList(); $errorAddressList->setAddresses([$mc1, $mc2]); diff --git a/test/Integration/ZipLookupsApiSpecTest.php b/test/Integration/ZipLookupsApiSpecTest.php index 1dec237..a4b7f35 100644 --- a/test/Integration/ZipLookupsApiSpecTest.php +++ b/test/Integration/ZipLookupsApiSpecTest.php @@ -62,6 +62,10 @@ public static function setUpBeforeClass(): void self::$zipApi = new ZipLookupsApi(self::$config); } + /** + * @group integration + * @group zipLookups + */ public function testZipLookupsApiInstantiation200() { try { $zipApi = new ZipLookupsApi(self::$config); @@ -71,6 +75,10 @@ public function testZipLookupsApiInstantiation200() { } } + /** + * @group integration + * @group zipLookups + */ public function testLookup() { try { @@ -84,6 +92,10 @@ public function testLookup() } } + /** + * @group integration + * @group zipLookups + */ public function testLookupError() { $zipEditable = new ZipEditable(); diff --git a/test/Unit/AddressesApiUnitTest.php b/test/Unit/AddressesApiUnitTest.php index e466f4a..8b9ffe2 100644 --- a/test/Unit/AddressesApiUnitTest.php +++ b/test/Unit/AddressesApiUnitTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the endpoint. */ -namespace OpenAPI\Client\Test\Api; +namespace OpenAPI\Client\Test\Api; use GuzzleHttp\Client; use GuzzleHttp\Exception\ConnectException; @@ -99,7 +99,7 @@ public function setUp(): void /** * @group unit - * @group address + * @group addresses */ public function testCreateConnectionError() { @@ -122,13 +122,13 @@ public function testCreateConnectionError() /** * @group unit - * @group address + * @group addresses */ public function testCreate() { $guzzleMock = new MockHandler(); $handlerStack = HandlerStack::create($guzzleMock); - $client = new Client(['handler' => $handlerStack]); + $client = new Client(['handler' => $handlerStack]); $config = new Configuration(); $config->setApiKey('basic', 'Totally Fake Key'); $addressesApi = new AddressesApi($config, $client); @@ -146,7 +146,7 @@ public function testCreate() /** * @group unit - * @group address + * @group addresses */ public function testCreateWithIdempotency() { @@ -168,7 +168,7 @@ public function testCreateWithIdempotency() /** * @group unit - * @group address + * @group addresses */ public function testCreateFailBadAddress() { @@ -189,7 +189,7 @@ public function testCreateFailBadAddress() /** * @group unit - * @group address + * @group addresses */ public function testCreateMalformedRequest() { @@ -212,7 +212,7 @@ public function testCreateMalformedRequest() /** * @group unit - * @group address + * @group addresses */ public function testCreateFailApiError() { @@ -235,7 +235,7 @@ public function testCreateFailApiError() /** * @group unit - * @group address + * @group addresses */ public function testCreateFailStatusCode() { @@ -258,10 +258,10 @@ public function testCreateFailStatusCode() /** ***** ***** ***** * Get * ***** ***** *****/ - + /** * @group unit - * @group address + * @group addresses */ public function testGetConnectionError() { @@ -284,13 +284,13 @@ public function testGetConnectionError() /** * @group unit - * @group address + * @group addresses */ public function testGet() { $guzzleMock = new MockHandler(); $handlerStack = HandlerStack::create($guzzleMock); - $client = new Client(['handler' => $handlerStack]); + $client = new Client(['handler' => $handlerStack]); $config = new Configuration(); $config->setApiKey('basic', 'Totally Fake Key'); $addressesApi = new AddressesApi($config, $client); @@ -306,7 +306,7 @@ public function testGet() /** * @group unit - * @group address + * @group addresses */ public function testGetFailNullId() { @@ -327,7 +327,7 @@ public function testGetFailNullId() /** * @group unit - * @group address + * @group addresses */ public function testGetFailBadId() { @@ -348,7 +348,7 @@ public function testGetFailBadId() /** * @group unit - * @group address + * @group addresses */ public function testGetFail() { @@ -371,7 +371,7 @@ public function testGetFail() /** * @group unit - * @group address + * @group addresses */ public function testGetApiError() { @@ -394,7 +394,7 @@ public function testGetApiError() /** * @group unit - * @group address + * @group addresses */ public function testGetFailStatusCode() { @@ -420,7 +420,7 @@ public function testGetFailStatusCode() /** * @group unit - * @group address + * @group addresses */ public function testListConnectionError() { @@ -443,13 +443,13 @@ public function testListConnectionError() /** * @group unit - * @group address + * @group addresses */ public function testList() { $guzzleMock = new MockHandler(); $handlerStack = HandlerStack::create($guzzleMock); - $client = new Client(['handler' => $handlerStack]); + $client = new Client(['handler' => $handlerStack]); $config = new Configuration(); $config->setApiKey('basic', 'Totally Fake Key'); $addressesApi = new AddressesApi($config, $client); @@ -469,7 +469,7 @@ public function testList() /** * @group unit - * @group address + * @group addresses */ public function testListFailBadParamsLargeLimit() { @@ -490,7 +490,7 @@ public function testListFailBadParamsLargeLimit() /** * @group unit - * @group address + * @group addresses */ public function testListFailBadParamsNegativeLimit() { @@ -511,7 +511,7 @@ public function testListFailBadParamsNegativeLimit() /** * @group unit - * @group address + * @group addresses */ public function testListFailBadParamsLargeMetadata() { @@ -532,7 +532,7 @@ public function testListFailBadParamsLargeMetadata() /** * @group unit - * @group address + * @group addresses */ public function testListFailApiError() { @@ -555,7 +555,7 @@ public function testListFailApiError() /** * @group unit - * @group address + * @group addresses */ public function testListFailStatusCode() { @@ -583,7 +583,7 @@ public function testListFailStatusCode() /** * @group unit - * @group address + * @group addresses */ public function testDeleteConnectionError() { @@ -606,13 +606,13 @@ public function testDeleteConnectionError() /** * @group unit - * @group address + * @group addresses */ public function testDelete() { $guzzleMock = new MockHandler(); $handlerStack = HandlerStack::create($guzzleMock); - $client = new Client(['handler' => $handlerStack]); + $client = new Client(['handler' => $handlerStack]); $config = new Configuration(); $config->setApiKey('basic', 'Totally Fake Key'); $addressesApi = new AddressesApi($config, $client); @@ -628,7 +628,7 @@ public function testDelete() /** * @group unit - * @group address + * @group addresses */ public function testDeleteFailMissingId() { @@ -649,7 +649,7 @@ public function testDeleteFailMissingId() /** * @group unit - * @group address + * @group addresses */ public function testDeleteFailBadId() { @@ -670,7 +670,7 @@ public function testDeleteFailBadId() /** * @group unit - * @group address + * @group addresses */ public function testDeleteFailApiError() { @@ -693,7 +693,7 @@ public function testDeleteFailApiError() /** * @group unit - * @group address + * @group addresses */ public function testDeleteFailStatusCode() { diff --git a/test/Unit/BankAccountsApiUnitTest.php b/test/Unit/BankAccountsApiUnitTest.php index 96a78a7..011784c 100644 --- a/test/Unit/BankAccountsApiUnitTest.php +++ b/test/Unit/BankAccountsApiUnitTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the endpoint. */ -namespace OpenAPI\Client\Test\Api; +namespace OpenAPI\Client\Test\Api; use GuzzleHttp\Client; use GuzzleHttp\Handler\MockHandler; @@ -99,7 +99,7 @@ public function setUp(): void /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testCreateConnectionError() { @@ -122,13 +122,13 @@ public function testCreateConnectionError() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testCreate() { $guzzleMock = new MockHandler(); $handlerStack = HandlerStack::create($guzzleMock); - $client = new Client(['handler' => $handlerStack]); + $client = new Client(['handler' => $handlerStack]); $config = new Configuration(); $config->setApiKey('basic', 'Totally Fake Key'); $bankAccountsApi = new BankAccountsApi($config, $client); @@ -146,7 +146,7 @@ public function testCreate() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testCreateFailBadBankAccount() { @@ -167,7 +167,7 @@ public function testCreateFailBadBankAccount() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testCreateMalformedRequest() { @@ -190,7 +190,7 @@ public function testCreateMalformedRequest() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testCreateFailApiError() { @@ -214,7 +214,7 @@ public function testCreateFailApiError() /** * @group unit - * @group address + * @group addresses */ public function testCreateFailStatusCode() { @@ -240,7 +240,7 @@ public function testCreateFailStatusCode() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testGetConnectionError() { @@ -263,7 +263,7 @@ public function testGetConnectionError() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testGet() { @@ -285,7 +285,7 @@ public function testGet() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testGetFailNullId() { @@ -306,7 +306,7 @@ public function testGetFailNullId() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testGetFailBadId() { @@ -327,7 +327,7 @@ public function testGetFailBadId() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testGetFail() { @@ -350,7 +350,7 @@ public function testGetFail() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testGetApiError() { @@ -373,7 +373,7 @@ public function testGetApiError() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testGetFailStatusCode() { @@ -399,7 +399,7 @@ public function testGetFailStatusCode() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testListConnectionError() { @@ -422,7 +422,7 @@ public function testListConnectionError() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testList() { @@ -449,7 +449,7 @@ public function testList() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testListFailBadParamsLargeLimit() { @@ -470,7 +470,7 @@ public function testListFailBadParamsLargeLimit() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testListFailBadParamsNegativeLimit() { @@ -491,7 +491,7 @@ public function testListFailBadParamsNegativeLimit() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testListFailBadParamsLargeMetadata() { @@ -512,7 +512,7 @@ public function testListFailBadParamsLargeMetadata() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testListFailApiError() { @@ -535,7 +535,7 @@ public function testListFailApiError() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testListFailStatusCode() { @@ -563,7 +563,7 @@ public function testListFailStatusCode() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testDeleteConnectionError() { @@ -586,7 +586,7 @@ public function testDeleteConnectionError() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testDelete() { @@ -608,7 +608,7 @@ public function testDelete() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testDeleteFailMissingId() { @@ -629,7 +629,7 @@ public function testDeleteFailMissingId() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testDeleteFailBadId() { @@ -650,7 +650,7 @@ public function testDeleteFailBadId() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testDeleteFailApiError() { @@ -673,7 +673,7 @@ public function testDeleteFailApiError() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testDeleteFailStatusCode() { @@ -699,7 +699,7 @@ public function testDeleteFailStatusCode() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testVerifyConnectionError() { @@ -723,7 +723,7 @@ public function testVerifyConnectionError() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testVerify() { $guzzleMock = new MockHandler(); @@ -745,7 +745,7 @@ public function testVerify() { /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testVerifyFail() { $guzzleMock = new MockHandler(); @@ -769,7 +769,7 @@ public function testVerifyFail() { /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testVerifyFailBadId() { @@ -792,7 +792,7 @@ public function testVerifyFailBadId() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testVerifyFailApiError() { @@ -816,7 +816,7 @@ public function testVerifyFailApiError() /** * @group unit - * @group bank_account + * @group bankAccounts */ public function testVerifyFailStatusCode() { diff --git a/test/Unit/BillingGroupsApiUnitTest.php b/test/Unit/BillingGroupsApiUnitTest.php index a838d36..79264ff 100644 --- a/test/Unit/BillingGroupsApiUnitTest.php +++ b/test/Unit/BillingGroupsApiUnitTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the endpoint. */ -namespace OpenAPI\Client\Test\Api; +namespace OpenAPI\Client\Test\Api; use GuzzleHttp\Client; use GuzzleHttp\Handler\MockHandler; @@ -95,7 +95,7 @@ public function setUp(): void /** * @group unit - * @group billinggroups + * @group billingGroups */ public function testCreateConnectionError() { @@ -115,16 +115,16 @@ public function testCreateConnectionError() echo 'Caught exception: ', $createError->getMessage(), "\n"; } } - + /** * @group unit - * @group billinggroups + * @group billingGroups */ public function testCreate() { $guzzleMock = new MockHandler(); $handlerStack = HandlerStack::create($guzzleMock); - $client = new Client(['handler' => $handlerStack]); + $client = new Client(['handler' => $handlerStack]); $config = new Configuration(); $config->setApiKey('basic', 'Totally Fake Key'); $billingGroupsApi = new BillingGroupsApi($config, $client); @@ -142,7 +142,7 @@ public function testCreate() /** * @group unit - * @group billinggroups + * @group billingGroups */ public function testCreateMalformedRequest() { @@ -165,7 +165,7 @@ public function testCreateMalformedRequest() /** * @group unit - * @group billinggroups + * @group billingGroups */ public function testCreateFailApiError() { @@ -189,7 +189,7 @@ public function testCreateFailApiError() /** * @group unit - * @group billinggroups + * @group billingGroups */ public function testCreateFailStatusCode() { @@ -215,7 +215,7 @@ public function testCreateFailStatusCode() /** * @group unit - * @group billinggroups + * @group billingGroups */ public function testGetConnectionError() { @@ -235,10 +235,10 @@ public function testGetConnectionError() echo 'Caught exception: ', $createError->getMessage(), "\n"; } } - + /** * @group unit - * @group billinggroups + * @group billingGroups */ public function testGet() { @@ -260,7 +260,7 @@ public function testGet() /** * @group unit - * @group billinggroups + * @group billingGroups */ public function testGetFailNullId() { @@ -281,7 +281,7 @@ public function testGetFailNullId() /** * @group unit - * @group billinggroups + * @group billingGroups */ public function testGetFailBadId() { @@ -299,10 +299,10 @@ public function testGetFailBadId() echo 'Caught exception: ', $creationError->getMessage(), "\n"; } } - + /** * @group unit - * @group billinggroups + * @group billingGroups */ public function testGetFail() { @@ -325,7 +325,7 @@ public function testGetFail() /** * @group unit - * @group billinggroups + * @group billingGroups */ public function testGetApiError() { @@ -348,7 +348,7 @@ public function testGetApiError() /** * @group unit - * @group billinggroups + * @group billingGroups */ public function testGetFailStatusCode() { @@ -374,7 +374,7 @@ public function testGetFailStatusCode() /** * @group unit - * @group billinggroups + * @group billingGroups */ public function testListConnectionError() { @@ -394,10 +394,10 @@ public function testListConnectionError() echo 'Caught exception: ', $createError->getMessage(), "\n"; } } - + /** * @group unit - * @group billinggroups + * @group billingGroups */ public function testList() { @@ -424,7 +424,7 @@ public function testList() /** * @group unit - * @group billinggroups + * @group billingGroups */ public function testListFailBadParamsLargeLimit() { @@ -445,7 +445,7 @@ public function testListFailBadParamsLargeLimit() /** * @group unit - * @group billinggroups + * @group billingGroups */ public function testListFailBadParamsNegativeLimit() { @@ -466,7 +466,7 @@ public function testListFailBadParamsNegativeLimit() /** * @group unit - * @group billinggroups + * @group billingGroups */ public function testListFailApiError() { @@ -489,7 +489,7 @@ public function testListFailApiError() /** * @group unit - * @group billinggroups + * @group billingGroups */ public function testListFailStatusCode() { @@ -517,7 +517,7 @@ public function testListFailStatusCode() /** * @group unit - * @group billinggroups + * @group billingGroups */ public function testUpdateConnectionError() { @@ -540,7 +540,7 @@ public function testUpdateConnectionError() /** * @group unit - * @group billinggroups + * @group billingGroups */ public function testUpdate() { @@ -562,7 +562,7 @@ public function testUpdate() /** * @group unit - * @group billinggroups + * @group billingGroups */ public function testUpdateFailNullId() { @@ -583,7 +583,7 @@ public function testUpdateFailNullId() /** * @group unit - * @group billinggroups + * @group billingGroups */ public function testUpdateFailBadId() { @@ -604,7 +604,7 @@ public function testUpdateFailBadId() /** * @group unit - * @group billinggroups + * @group billingGroups */ public function testUpdateFail() { @@ -627,7 +627,7 @@ public function testUpdateFail() /** * @group unit - * @group billinggroups + * @group billingGroups */ public function testUpdateApiError() { @@ -650,7 +650,7 @@ public function testUpdateApiError() /** * @group unit - * @group billinggroups + * @group billingGroups */ public function testUpdateFailStatusCode() { diff --git a/test/Unit/CardOrdersApiUnitTest.php b/test/Unit/CardOrdersApiUnitTest.php index 70c65e5..3c760e8 100644 --- a/test/Unit/CardOrdersApiUnitTest.php +++ b/test/Unit/CardOrdersApiUnitTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the endpoint. */ -namespace OpenAPI\Client\Test\Api; +namespace OpenAPI\Client\Test\Api; use GuzzleHttp\Client; use GuzzleHttp\Exception\ConnectException; @@ -81,7 +81,7 @@ public function setUp(): void /** * @group unit - * @group cardorder + * @group cardOrders */ public function testCreateConnectionError() { @@ -104,7 +104,7 @@ public function testCreateConnectionError() /** * @group unit - * @group cardorder + * @group cardOrders */ public function testCreate() { @@ -128,7 +128,7 @@ public function testCreate() /** * @group unit - * @group cardorder + * @group cardOrders */ public function testCreateWithIdempotency() { @@ -150,7 +150,7 @@ public function testCreateWithIdempotency() /** * @group unit - * @group cardorder + * @group cardOrders */ public function testCreateFailBadRecord() { @@ -171,7 +171,7 @@ public function testCreateFailBadRecord() /** * @group unit - * @group cardorder + * @group cardOrders */ public function testCreateMalformedRequest() { @@ -194,7 +194,7 @@ public function testCreateMalformedRequest() /** * @group unit - * @group cardorder + * @group cardOrders */ public function testCreateFailApiError() { @@ -217,7 +217,7 @@ public function testCreateFailApiError() /** * @group unit - * @group cardorder + * @group cardOrders */ public function testCreateFailStatusCode() { @@ -243,7 +243,7 @@ public function testCreateFailStatusCode() /** * @group unit - * @group cardorder + * @group cardOrders */ public function testGetConnectionError() { @@ -268,7 +268,7 @@ public function testGetConnectionError() /** * @group unit - * @group cardorder + * @group cardOrders */ public function testGetFailNullId() { @@ -289,7 +289,7 @@ public function testGetFailNullId() /** * @group unit - * @group cardorder + * @group cardOrders */ public function testGetFailBadId() { @@ -310,7 +310,7 @@ public function testGetFailBadId() /** * @group unit - * @group cardorder + * @group cardOrders */ public function testGetFail() { @@ -333,7 +333,7 @@ public function testGetFail() /** * @group unit - * @group cardorder + * @group cardOrders */ public function testGetApiError() { @@ -356,7 +356,7 @@ public function testGetApiError() /** * @group unit - * @group cardorder + * @group cardOrders */ public function testGetFailStatusCode() { diff --git a/test/Unit/ChecksApiUnitTest.php b/test/Unit/ChecksApiUnitTest.php index e1174ae..3612ca9 100644 --- a/test/Unit/ChecksApiUnitTest.php +++ b/test/Unit/ChecksApiUnitTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the endpoint. */ -namespace OpenAPI\Client\Test\Api; +namespace OpenAPI\Client\Test\Api; use GuzzleHttp\Client; use GuzzleHttp\Exception\ConnectException; @@ -99,7 +99,7 @@ public function setUp(): void /** * @group unit - * @group check + * @group checks */ public function testCreateConnectionError() { @@ -122,7 +122,7 @@ public function testCreateConnectionError() /** * @group unit - * @group check + * @group checks */ public function testCreate() { @@ -146,7 +146,7 @@ public function testCreate() /** * @group unit - * @group check + * @group checks */ public function testCreateWithIdempotency() { @@ -168,7 +168,7 @@ public function testCreateWithIdempotency() /** * @group unit - * @group check + * @group checks */ public function testCreateFailBadAddress() { @@ -189,7 +189,7 @@ public function testCreateFailBadAddress() /** * @group unit - * @group check + * @group checks */ public function testCreateMalformedRequest() { @@ -212,7 +212,7 @@ public function testCreateMalformedRequest() /** * @group unit - * @group check + * @group checks */ public function testCreateFailApiError() { @@ -235,7 +235,7 @@ public function testCreateFailApiError() /** * @group unit - * @group check + * @group checks */ public function testCreateFailStatusCode() { @@ -261,7 +261,7 @@ public function testCreateFailStatusCode() /** * @group unit - * @group check + * @group checks */ public function testGetConnectionError() { @@ -284,7 +284,7 @@ public function testGetConnectionError() /** * @group unit - * @group check + * @group checks */ public function testGet() { @@ -306,7 +306,7 @@ public function testGet() /** * @group unit - * @group check + * @group checks */ public function testGetFailNullId() { @@ -327,7 +327,7 @@ public function testGetFailNullId() /** * @group unit - * @group check + * @group checks */ public function testGetFailBadId() { @@ -348,7 +348,7 @@ public function testGetFailBadId() /** * @group unit - * @group check + * @group checks */ public function testGetFail() { @@ -371,7 +371,7 @@ public function testGetFail() /** * @group unit - * @group check + * @group checks */ public function testGetApiError() { @@ -394,7 +394,7 @@ public function testGetApiError() /** * @group unit - * @group check + * @group checks */ public function testGetFailStatusCode() { @@ -413,14 +413,14 @@ public function testGetFailStatusCode() echo 'Caught exception: ', $instantiationError->getMessage(), "\n"; } } - + /** ***** ***** ***** * List * ***** ***** *****/ /** * @group unit - * @group check + * @group checks */ public function testListConnectionError() { @@ -443,7 +443,7 @@ public function testListConnectionError() /** * @group unit - * @group check + * @group checks */ public function testList() { @@ -469,7 +469,7 @@ public function testList() /** * @group unit - * @group check + * @group checks */ public function testListFailBadParamsLargeLimit() { @@ -490,7 +490,7 @@ public function testListFailBadParamsLargeLimit() /** * @group unit - * @group check + * @group checks */ public function testListFailBadParamsNegativeLimit() { @@ -511,7 +511,7 @@ public function testListFailBadParamsNegativeLimit() /** * @group unit - * @group check + * @group checks */ public function testListFailBadParamsLargeMetadata() { @@ -532,7 +532,7 @@ public function testListFailBadParamsLargeMetadata() /** * @group unit - * @group check + * @group checks */ public function testListFailApiError() { @@ -555,7 +555,7 @@ public function testListFailApiError() /** * @group unit - * @group check + * @group checks */ public function testListFailStatusCode() { @@ -583,7 +583,7 @@ public function testListFailStatusCode() /** * @group unit - * @group check + * @group checks */ public function testCancelConnectionError() { @@ -606,7 +606,7 @@ public function testCancelConnectionError() /** * @group unit - * @group check + * @group checks */ public function testCancel() { @@ -628,7 +628,7 @@ public function testCancel() /** * @group unit - * @group check + * @group checks */ public function testCancelFailMissingId() { @@ -649,7 +649,7 @@ public function testCancelFailMissingId() /** * @group unit - * @group check + * @group checks */ public function testCancelFailBadId() { @@ -670,7 +670,7 @@ public function testCancelFailBadId() /** * @group unit - * @group check + * @group checks */ public function testCancelFailApiError() { @@ -693,7 +693,7 @@ public function testCancelFailApiError() /** * @group unit - * @group check + * @group checks */ public function testCancelFailStatusCode() { diff --git a/test/Unit/IntlVerificationsApiUnitTest.php b/test/Unit/IntlVerificationsApiUnitTest.php index 4b81310..5a0922d 100644 --- a/test/Unit/IntlVerificationsApiUnitTest.php +++ b/test/Unit/IntlVerificationsApiUnitTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the endpoint. */ -namespace OpenAPI\Client\Test\Api; +namespace OpenAPI\Client\Test\Api; use GuzzleHttp\Client; use GuzzleHttp\Exception\ConnectException; @@ -104,7 +104,7 @@ public function setUp(): void /** * @group unit - * @group usVerifications + * @group intlVerifications */ public function testBulkConnectionError() { @@ -127,7 +127,7 @@ public function testBulkConnectionError() /** * @group unit - * @group usVerifications + * @group intlVerifications */ public function testBulk() { @@ -153,7 +153,7 @@ public function testBulk() /** * @group unit - * @group usVerifications + * @group intlVerifications */ public function testBulkApiError() { @@ -176,7 +176,7 @@ public function testBulkApiError() /** * @group unit - * @group usVerifications + * @group intlVerifications */ public function testBulkFailStatusCode() { @@ -202,7 +202,7 @@ public function testBulkFailStatusCode() /** * @group unit - * @group usVerifications + * @group intlVerifications */ public function testSingleConnectionError() { @@ -225,13 +225,13 @@ public function testSingleConnectionError() /** * @group unit - * @group usVerifications + * @group intlVerifications */ public function testSingle() { $guzzleMock = new MockHandler(); $handlerStack = HandlerStack::create($guzzleMock); - $client = new Client(['handler' => $handlerStack]); + $client = new Client(['handler' => $handlerStack]); $config = new Configuration(); $config->setApiKey('basic', 'Totally Fake Key'); $verificationsApi = new IntlVerificationsApi($config, $client); @@ -247,7 +247,7 @@ public function testSingle() /** * @group unit - * @group usVerifications + * @group intlVerifications */ public function testSingleFailNullId() { @@ -268,7 +268,7 @@ public function testSingleFailNullId() /** * @group unit - * @group usVerifications + * @group intlVerifications */ public function testSingleApiError() { @@ -291,7 +291,7 @@ public function testSingleApiError() /** * @group unit - * @group usVerifications + * @group intlVerifications */ public function testSingleFailStatusCode() { diff --git a/test/Unit/PostcardsApiUnitTest.php b/test/Unit/PostcardsApiUnitTest.php index e9ee9d5..a65a46f 100644 --- a/test/Unit/PostcardsApiUnitTest.php +++ b/test/Unit/PostcardsApiUnitTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the endpoint. */ -namespace OpenAPI\Client\Test\Api; +namespace OpenAPI\Client\Test\Api; use GuzzleHttp\Client; use GuzzleHttp\Handler\MockHandler; @@ -100,7 +100,7 @@ public function setUp(): void /** * @group unit - * @group postcard + * @group postcards */ public function testCreateConnectionError() { @@ -123,13 +123,13 @@ public function testCreateConnectionError() /** * @group unit - * @group postcard + * @group postcards */ public function testCreate() { $guzzleMock = new MockHandler(); $handlerStack = HandlerStack::create($guzzleMock); - $client = new Client(['handler' => $handlerStack]); + $client = new Client(['handler' => $handlerStack]); $config = new Configuration(); $config->setApiKey('basic', 'Totally Fake Key'); $postcardsApi = new PostcardsApi($config, $client); @@ -148,7 +148,7 @@ public function testCreate() /** * @group unit - * @group postcard + * @group postcards */ public function testCreateWithIdempotency() { @@ -170,7 +170,7 @@ public function testCreateWithIdempotency() /** * @group unit - * @group postcard + * @group postcards */ public function testCreateFailBadAddress() { @@ -188,10 +188,10 @@ public function testCreateFailBadAddress() echo 'Caught exception: ', $createError->getMessage(), "\n"; } } - + /** * @group unit - * @group postcard + * @group postcards */ public function testCreateMalformedRequest() { @@ -214,7 +214,7 @@ public function testCreateMalformedRequest() /** * @group unit - * @group postcard + * @group postcards */ public function testCreateFailApiError() { @@ -238,7 +238,7 @@ public function testCreateFailApiError() /** * @group unit - * @group postcard + * @group postcards */ public function testCreateFailStatusCode() { @@ -264,7 +264,7 @@ public function testCreateFailStatusCode() /** * @group unit - * @group postcard + * @group postcards */ public function testGetConnectionError() { @@ -287,7 +287,7 @@ public function testGetConnectionError() /** * @group unit - * @group postcard + * @group postcards */ public function testGet() { @@ -309,7 +309,7 @@ public function testGet() /** * @group unit - * @group postcard + * @group postcards */ public function testGetFailNullId() { @@ -330,7 +330,7 @@ public function testGetFailNullId() /** * @group unit - * @group postcard + * @group postcards */ public function testGetFailBadId() { @@ -351,7 +351,7 @@ public function testGetFailBadId() /** * @group unit - * @group postcard + * @group postcards */ public function testGetFail() { @@ -374,7 +374,7 @@ public function testGetFail() /** * @group unit - * @group postcard + * @group postcards */ public function testGetApiError() { @@ -397,7 +397,7 @@ public function testGetApiError() /** * @group unit - * @group postcard + * @group postcards */ public function testGetFailStatusCode() { @@ -423,7 +423,7 @@ public function testGetFailStatusCode() /** * @group unit - * @group postcard + * @group postcards */ public function testListConnectionError() { @@ -443,10 +443,10 @@ public function testListConnectionError() echo 'Caught exception: ', $createError->getMessage(), "\n"; } } - + /** * @group unit - * @group postcard + * @group postcards */ public function testList() { @@ -473,7 +473,7 @@ public function testList() /** * @group unit - * @group postcard + * @group postcards */ public function testListFailBadParamsLargeLimit() { @@ -494,7 +494,7 @@ public function testListFailBadParamsLargeLimit() /** * @group unit - * @group postcard + * @group postcards */ public function testListFailBadParamsNegativeLimit() { @@ -515,7 +515,7 @@ public function testListFailBadParamsNegativeLimit() /** * @group unit - * @group postcard + * @group postcards */ public function testListFailBadParamsLargeMetadata() { @@ -536,7 +536,7 @@ public function testListFailBadParamsLargeMetadata() /** * @group unit - * @group postcard + * @group postcards */ public function testListFailApiError() { @@ -559,7 +559,7 @@ public function testListFailApiError() /** * @group unit - * @group postcard + * @group postcards */ public function testListFailStatusCode() { @@ -578,7 +578,7 @@ public function testListFailStatusCode() echo 'Caught exception: ', $instantiationError->getMessage(), "\n"; } } - + // ToDo: public function testListPagination() /** ***** ***** ***** @@ -587,7 +587,7 @@ public function testListFailStatusCode() /** * @group unit - * @group postcard + * @group postcards */ public function testCancelConnectionError() { @@ -607,10 +607,10 @@ public function testCancelConnectionError() echo 'Caught exception: ', $createError->getMessage(), "\n"; } } - + /** * @group unit - * @group postcard + * @group postcards */ public function testCancel() { @@ -633,7 +633,7 @@ public function testCancel() /** * @group unit - * @group postcard + * @group postcards */ public function testCancelFailMissingId() { @@ -654,7 +654,7 @@ public function testCancelFailMissingId() /** * @group unit - * @group postcard + * @group postcards */ public function testCancelFailBadId() { @@ -675,7 +675,7 @@ public function testCancelFailBadId() /** * @group unit - * @group postcard + * @group postcards */ public function testCancelFailApiError() { @@ -698,7 +698,7 @@ public function testCancelFailApiError() /** * @group unit - * @group postcard + * @group postcards */ public function testCancelFailStatusCode() { diff --git a/test/Unit/SelfMailersApiUnitTest.php b/test/Unit/SelfMailersApiUnitTest.php index 207c880..0688b88 100644 --- a/test/Unit/SelfMailersApiUnitTest.php +++ b/test/Unit/SelfMailersApiUnitTest.php @@ -26,7 +26,7 @@ * Please update the test case below to test the endpoint. */ -namespace OpenAPI\Client\Test\Api; +namespace OpenAPI\Client\Test\Api; use GuzzleHttp\Client; use GuzzleHttp\Exception\ConnectException; @@ -71,7 +71,7 @@ public function setUp(): void { self::$mockSelfMailerEditableId = "sfm_fakeId"; self::$mockSelfMailerEditable = new SelfMailerEditable(); - + self::$mockSelfMailerResponse = new SelfMailer(); self::$mockSelfMailerResponse->setId(self::$mockSelfMailerEditableId); @@ -83,7 +83,7 @@ public function setUp(): void $item1->setId("sfm_fakeId1"); $item2->setId("sfm_fakeId2"); $item3->setId("sfm_fakeId3"); - + self::$mockSelfMailerList->setData(array ($item1, $item2, $item3)); self::$mockSelfMailerList->setObject("list"); self::$mockSelfMailerList->setCount("3"); @@ -100,7 +100,7 @@ public function setUp(): void /** * @group unit - * @group templates + * @group selfMailers */ public function testCreateConnectionError() { @@ -123,13 +123,13 @@ public function testCreateConnectionError() /** * @group unit - * @group templates + * @group selfMailers */ public function testCreate() { $guzzleMock = new MockHandler(); $handlerStack = HandlerStack::create($guzzleMock); - $client = new Client(['handler' => $handlerStack]); + $client = new Client(['handler' => $handlerStack]); $config = new Configuration(); $config->setApiKey('basic', 'Totally Fake Key'); $selfMailerApi = new SelfMailersApi($config, $client); @@ -147,7 +147,7 @@ public function testCreate() /** * @group unit - * @group templates + * @group selfMailers */ public function testCreateWithIdempotency() { @@ -169,7 +169,7 @@ public function testCreateWithIdempotency() /** * @group unit - * @group templates + * @group selfMailers */ public function testCreateFailBadSelfMailer() { @@ -190,7 +190,7 @@ public function testCreateFailBadSelfMailer() /** * @group unit - * @group templates + * @group selfMailers */ public function testCreateMalformedRequest() { @@ -213,7 +213,7 @@ public function testCreateMalformedRequest() /** * @group unit - * @group templates + * @group selfMailers */ public function testCreateFailApiError() { @@ -236,7 +236,7 @@ public function testCreateFailApiError() /** * @group unit - * @group templates + * @group selfMailers */ public function testCreateFailStatusCode() { @@ -259,10 +259,10 @@ public function testCreateFailStatusCode() /** ***** ***** ***** * Get * ***** ***** *****/ - + /** * @group unit - * @group templates + * @group selfMailers */ public function testGetConnectionError() { @@ -285,13 +285,13 @@ public function testGetConnectionError() /** * @group unit - * @group templates + * @group selfMailers */ public function testGet() { $guzzleMock = new MockHandler(); $handlerStack = HandlerStack::create($guzzleMock); - $client = new Client(['handler' => $handlerStack]); + $client = new Client(['handler' => $handlerStack]); $config = new Configuration(); $config->setApiKey('basic', 'Totally Fake Key'); $selfMailerApi = new SelfMailersApi($config, $client); @@ -307,7 +307,7 @@ public function testGet() /** * @group unit - * @group templates + * @group selfMailers */ public function testGetFailNullId() { @@ -328,7 +328,7 @@ public function testGetFailNullId() /** * @group unit - * @group templates + * @group selfMailers */ public function testGetFailBadId() { @@ -349,7 +349,7 @@ public function testGetFailBadId() /** * @group unit - * @group templates + * @group selfMailers */ public function testGetFail() { @@ -372,7 +372,7 @@ public function testGetFail() /** * @group unit - * @group templates + * @group selfMailers */ public function testGetApiError() { @@ -395,7 +395,7 @@ public function testGetApiError() /** * @group unit - * @group templates + * @group selfMailers */ public function testGetFailStatusCode() { @@ -421,7 +421,7 @@ public function testGetFailStatusCode() /** * @group unit - * @group templates + * @group selfMailers */ public function testListConnectionError() { @@ -444,13 +444,13 @@ public function testListConnectionError() /** * @group unit - * @group templates + * @group selfMailers */ public function testList() { $guzzleMock = new MockHandler(); $handlerStack = HandlerStack::create($guzzleMock); - $client = new Client(['handler' => $handlerStack]); + $client = new Client(['handler' => $handlerStack]); $config = new Configuration(); $config->setApiKey('basic', 'Totally Fake Key'); $selfMailerApi = new SelfMailersApi($config, $client); @@ -470,7 +470,7 @@ public function testList() /** * @group unit - * @group templates + * @group selfMailers */ public function testListFailBadParamsLargeLimit() { @@ -491,7 +491,7 @@ public function testListFailBadParamsLargeLimit() /** * @group unit - * @group templates + * @group selfMailers */ public function testListFailBadParamsNegativeLimit() { @@ -512,7 +512,7 @@ public function testListFailBadParamsNegativeLimit() /** * @group unit - * @group templates + * @group selfMailers */ public function testListFailBadParamsLargeMetadata() { @@ -533,7 +533,7 @@ public function testListFailBadParamsLargeMetadata() /** * @group unit - * @group templates + * @group selfMailers */ public function testListFailApiError() { @@ -556,7 +556,7 @@ public function testListFailApiError() /** * @group unit - * @group templates + * @group selfMailers */ public function testListFailStatusCode() { @@ -577,15 +577,15 @@ public function testListFailStatusCode() } // ToDo: public function testListPagination() - - + + /** ***** ***** ***** * Delete * ***** ***** *****/ /** * @group unit - * @group templates + * @group selfMailers */ public function testDeleteConnectionError() { @@ -608,13 +608,13 @@ public function testDeleteConnectionError() /** * @group unit - * @group templates + * @group selfMailers */ public function testDelete() { $guzzleMock = new MockHandler(); $handlerStack = HandlerStack::create($guzzleMock); - $client = new Client(['handler' => $handlerStack]); + $client = new Client(['handler' => $handlerStack]); $config = new Configuration(); $config->setApiKey('basic', 'Totally Fake Key'); $selfMailerApi = new SelfMailersApi($config, $client); @@ -630,7 +630,7 @@ public function testDelete() /** * @group unit - * @group templates + * @group selfMailers */ public function testDeleteFailMissingId() { @@ -651,7 +651,7 @@ public function testDeleteFailMissingId() /** * @group unit - * @group templates + * @group selfMailers */ public function testDeleteFailBadId() { @@ -672,7 +672,7 @@ public function testDeleteFailBadId() /** * @group unit - * @group templates + * @group selfMailers */ public function testDeleteFailApiError() { @@ -695,7 +695,7 @@ public function testDeleteFailApiError() /** * @group unit - * @group templates + * @group selfMailers */ public function testDeleteFailStatusCode() {