forked from z38/swiss-payment
-
Notifications
You must be signed in to change notification settings - Fork 6
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
6 changed files
with
165 additions
and
9 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
25 changes: 25 additions & 0 deletions
25
tests/Z38/SwissPayment/Tests/StructuredPostalAddressTest.php
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,25 @@ | ||
<?php | ||
|
||
namespace Z38\SwissPayment\Tests; | ||
|
||
use Z38\SwissPayment\StructuredPostalAddress; | ||
|
||
/** | ||
* @coversDefaultClass \Z38\SwissPayment\StructuredPostalAddress | ||
*/ | ||
class StructuredPostalAddressTest extends TestCase | ||
{ | ||
/** | ||
* @covers ::sanitize | ||
*/ | ||
public function testSanitize() | ||
{ | ||
$this->assertInstanceOf('Z38\SwissPayment\StructuredPostalAddress', StructuredPostalAddress::sanitize( | ||
'Dorfstrasse', | ||
'∅', | ||
'Pfaffenschlag bei Waidhofen an der Thaya', | ||
'3834', | ||
'AT' | ||
)); | ||
} | ||
} |
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
22 changes: 22 additions & 0 deletions
22
tests/Z38/SwissPayment/Tests/UnstructuredPostalAddressTest.php
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,22 @@ | ||
<?php | ||
|
||
namespace Z38\SwissPayment\Tests; | ||
|
||
use Z38\SwissPayment\UnstructuredPostalAddress; | ||
|
||
/** | ||
* @coversDefaultClass \Z38\SwissPayment\UnstructuredPostalAddress | ||
*/ | ||
class UnstructuredPostalAddressTest extends TestCase | ||
{ | ||
/** | ||
* @covers ::sanitize | ||
*/ | ||
public function testSanitize() | ||
{ | ||
$this->assertInstanceOf('Z38\SwissPayment\UnstructuredPostalAddress', UnstructuredPostalAddress::sanitize( | ||
"Dorf—Strasse 3\n\n", | ||
"8000\tZürich" | ||
)); | ||
} | ||
} |