Skip to content

Commit

Permalink
fix(abr): allow empty string not null (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomtomau authored Apr 20, 2023
1 parent 5753351 commit 4f4ca91
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/Model/AbnResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ final class AbnResponse extends AbstractResponse
public \DateTimeImmutable $addressDate;

#[SerializedName('AddressPostcode')]
public ?string $addressPostcode;
public string $addressPostcode;

#[SerializedName('AddressState')]
public ?string $addressState;
public string $addressState;

/**
* @var string[]
Expand Down
8 changes: 4 additions & 4 deletions tests/Model/AbnResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,12 @@ public function getValidTests(): \Generator
yield 'no gst' => [$fields];

$fields = MockAbnResponse::valid();
$fields['AddressState'] = null;
yield 'no address state' => [$fields];
$fields['AddressState'] = '';
yield 'empty string for address state' => [$fields];

$fields = MockAbnResponse::valid();
$fields['AddressPostcode'] = null;
yield 'no AddressPostcode' => [$fields];
$fields['AddressPostcode'] = '';
yield 'empty string for address postcode' => [$fields];
}

/**
Expand Down

0 comments on commit 4f4ca91

Please sign in to comment.