Skip to content

Commit

Permalink
Fix rPropNum type error
Browse files Browse the repository at this point in the history
  • Loading branch information
SlimDeluxe committed Nov 22, 2021
1 parent dbac64b commit 6e773e8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Requests/ParcelImport.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class ParcelImport extends AbstractRequest {
public string $street;

/**
* @var string Receiver house number (case-sensitive)
* @var string|null Receiver house number (case-sensitive)
*/
public string $rPropNum;
public ?string $rPropNum = null;

/**
* @var string Receiver city
Expand Down
19 changes: 19 additions & 0 deletions tests/Feature/ParcelImportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,23 @@ public function testRequiredAttribute()

$request->validate();
}

public function testNoPropNum()
{
$request = new ParcelImport($this->api);
$request->name1 = 'Zdravko Dren';
$request->street = 'Partizanska 12';
$request->rPropNum = NULL;
$request->city = 'Izola';
$request->country = 'SI';
$request->pcode = '6310';
$request->num_of_parcel = 1;
$request->parcel_type = ParcelType::HOME_B2C;
$request->predict = TRUE;
$request->phone = '090123456';

$response = $request->send();

$this->assertInstanceOf(ParcelImportResponse::class, $response);
}
}

0 comments on commit 6e773e8

Please sign in to comment.