Skip to content

Commit

Permalink
add clean step to makefile and add address test to verify generated c…
Browse files Browse the repository at this point in the history
…ode from api-metadata-specs PR
  • Loading branch information
rkeur7 committed Nov 13, 2024
1 parent 5f88a6d commit 035ecba
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ LOCAL_SPEC_FILE=${BUILD_DIR}public-api.yaml

check: test

clean:
php composer.phar clear-cache
rm -rf vendor/
rm composer.lock

install:
php composer.phar install

Expand Down
27 changes: 27 additions & 0 deletions tests/Shippo/API/AddressTest.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php
declare(strict_types=1);
namespace Shippo\API;
require 'vendor/autoload.php';

use Shippo\API;
use Shippo\API\Models\Components\Address;
use Shippo\API\Models\Components\AddressPaginatedList;

final class AddressTest extends IntegrationTestCase
{


public function testListAllAddresses()
{
$response = $this->getSdk()->addresses->list(
page: 1,
results: 10,
shippoApiVersion: '2018-02-08'

);

$this->assertEquals(200, $response->statusCode);
$this->assertNotNull($response->addressPaginatedList);
$this->assertInstanceOf(AddressPaginatedList::class, $response->addressPaginatedList);
}
}

0 comments on commit 035ecba

Please sign in to comment.