| 1 |
<?php |
| 2 |
|
| 3 |
declare( strict_types=1 ); |
| 4 |
|
| 5 |
namespace Tests\Core\Entity; |
| 6 |
|
| 7 |
use PHPUnit\Framework\TestCase; |
| 8 |
use Tests\Core\DummyFactory; |
| 9 |
|
| 10 |
class CustomsDeclarationItemTest extends TestCase { |
| 11 |
public function testSettersAndGetters(): void { |
| 12 |
$customsDeclarationItem = DummyFactory::createCustomsDeclarationItem(); |
| 13 |
|
| 14 |
$dummyId = 'dummyId'; |
| 15 |
$customsDeclarationItem->setId( $dummyId ); |
| 16 |
self::assertSame( $dummyId, $customsDeclarationItem->getId() ); |
| 17 |
|
| 18 |
$dummyProductName = 'dummyProductName'; |
| 19 |
$customsDeclarationItem->setProductName( $dummyProductName ); |
| 20 |
self::assertSame( $dummyProductName, $customsDeclarationItem->getProductName() ); |
| 21 |
|
| 22 |
$customsDeclarationItem->setIsFoodOrBook( true ); |
| 23 |
self::assertTrue( $customsDeclarationItem->isFoodOrBook() ); |
| 24 |
|
| 25 |
$customsDeclarationItem->setIsVoc( true ); |
| 26 |
self::assertTrue( $customsDeclarationItem->isVoc() ); |
| 27 |
|
| 28 |
self::assertIsString( $customsDeclarationItem->getCountryOfOrigin() ); |
| 29 |
self::assertIsString( $customsDeclarationItem->getCustomsCode() ); |
| 30 |
self::assertIsString( $customsDeclarationItem->getCustomsDeclarationId() ); |
| 31 |
self::assertIsString( $customsDeclarationItem->getProductNameEn() ); |
| 32 |
self::assertIsString( $customsDeclarationItem->getCountryOfOrigin() ); |
| 33 |
self::assertIsInt( $customsDeclarationItem->getUnitsCount() ); |
| 34 |
self::assertIsFloat( $customsDeclarationItem->getValue() ); |
| 35 |
self::assertIsFloat( $customsDeclarationItem->getWeight() ); |
| 36 |
} |
| 37 |
} |
| 38 |
|