PluginProbe
Packeta / trunk
Packeta vtrunk
2.3.2 2.3.1 trunk 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.3.0 1.3.1 1.3.2 1.4 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 All 56 releases
packeta / tests / Core / Entity / CustomsDeclarationItemTest.php

CustomsDeclarationItemTest.php in Packeta trunk, at tests/Core/Entity/CustomsDeclarationItemTest.php

38 lines 1.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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