# packeta/trunk/tests/Core/Validator/AddressTest.php

Packeta, version trunk. 22 lines.

- Page: https://pluginprobe.com/plugins/packeta/trunk/code/tests/Core/Validator/AddressTest.php
- Raw: https://pluginprobe.com/plugins/packeta/trunk/raw/tests/Core/Validator/AddressTest.php
- Modified: 2025-03-10T10:47:38+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/packeta/trunk/code/tests/Core/Validator/AddressTest.php#L10-L20`.

```php
<?php

declare( strict_types=1 );

namespace Tests\Core\Validator;

use Packetery\Core\Validator\Address;
use PHPUnit\Framework\TestCase;
use Tests\Core\DummyFactory;

class AddressTest extends TestCase {
	public function testValidate(): void {
		$validator = new Address();

		$dummyAddress = DummyFactory::createAddress();
		self::assertTrue( $validator->validate( $dummyAddress ) );

		$dummyAddressInvalid = DummyFactory::createInvalidAddress();
		self::assertFalse( $validator->validate( $dummyAddressInvalid ) );
	}
}

```
