| 1 |
<?php |
| 2 |
|
| 3 |
declare( strict_types=1 ); |
| 4 |
|
| 5 |
namespace Tests\Core\Validator; |
| 6 |
|
| 7 |
use Packetery\Core\Validator\Address; |
| 8 |
use PHPUnit\Framework\TestCase; |
| 9 |
use Tests\Core\DummyFactory; |
| 10 |
|
| 11 |
class AddressTest extends TestCase { |
| 12 |
public function testValidate(): void { |
| 13 |
$validator = new Address(); |
| 14 |
|
| 15 |
$dummyAddress = DummyFactory::createAddress(); |
| 16 |
self::assertTrue( $validator->validate( $dummyAddress ) ); |
| 17 |
|
| 18 |
$dummyAddressInvalid = DummyFactory::createInvalidAddress(); |
| 19 |
self::assertFalse( $validator->validate( $dummyAddressInvalid ) ); |
| 20 |
} |
| 21 |
} |
| 22 |
|