# packeta/2.1/tests/Core/Entity/CustomsDeclarationItemTest.php

Packeta, version 2.1. 38 lines.

- Page: https://pluginprobe.com/plugins/packeta/2.1/code/tests/Core/Entity/CustomsDeclarationItemTest.php
- Raw: https://pluginprobe.com/plugins/packeta/2.1/raw/tests/Core/Entity/CustomsDeclarationItemTest.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/2.1/code/tests/Core/Entity/CustomsDeclarationItemTest.php#L10-L20`.

```php
<?php

declare( strict_types=1 );

namespace Tests\Core\Entity;

use PHPUnit\Framework\TestCase;
use Tests\Core\DummyFactory;

class CustomsDeclarationItemTest extends TestCase {
	public function testSettersAndGetters(): void {
		$customsDeclarationItem = DummyFactory::createCustomsDeclarationItem();

		$dummyId = 'dummyId';
		$customsDeclarationItem->setId( $dummyId );
		self::assertSame( $dummyId, $customsDeclarationItem->getId() );

		$dummyProductName = 'dummyProductName';
		$customsDeclarationItem->setProductName( $dummyProductName );
		self::assertSame( $dummyProductName, $customsDeclarationItem->getProductName() );

		$customsDeclarationItem->setIsFoodOrBook( true );
		self::assertTrue( $customsDeclarationItem->isFoodOrBook() );

		$customsDeclarationItem->setIsVoc( true );
		self::assertTrue( $customsDeclarationItem->isVoc() );

		self::assertIsString( $customsDeclarationItem->getCountryOfOrigin() );
		self::assertIsString( $customsDeclarationItem->getCustomsCode() );
		self::assertIsString( $customsDeclarationItem->getCustomsDeclarationId() );
		self::assertIsString( $customsDeclarationItem->getProductNameEn() );
		self::assertIsString( $customsDeclarationItem->getCountryOfOrigin() );
		self::assertIsInt( $customsDeclarationItem->getUnitsCount() );
		self::assertIsFloat( $customsDeclarationItem->getValue() );
		self::assertIsFloat( $customsDeclarationItem->getWeight() );
	}
}

```
