Passed
Pull Request — master (#59)
by Raúl
05:19 queued 01:21
created

AddressTest::testSetFullName()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 5
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 7
rs 10
1
<?php
2
3
namespace Test\Pagantis\OrdersApiClient\Model\Order\User;
4
5
use Faker\Factory;
6
use Pagantis\OrdersApiClient\Model\Order\User\Address;
7
use Test\Pagantis\OrdersApiClient\AbstractTest;
8
9
/**
10
 * Class AddressTest
11
 * @package Test\Pagantis\OrdersApiClient\Model\Order\User
12
 */
13
class AddressTest extends AbstractTest
14
{
15
    /**
16
     * testSetFullName
17
     */
18
    public function testSetFullName()
19
    {
20
        $faker = Factory::create();
21
        $address = new Address();
22
        $fullName = $faker->name.' '.$faker->lastName;
23
        $address->setFullName($fullName);
24
        $this->assertSame($fullName, $address->getFullName());
25
    }
26
27
    /**
28
     * testSetTaxId
29
     */
30
    public function testSetTaxId()
31
    {
32
        $address = new Address();
33
        $taxId = 'A123456789B';
34
        $address->setTaxId($taxId);
35
        $this->assertSame($taxId, $address->getTaxId());
36
    }
37
38
    /**
39
     * testSetNationalId
40
     */
41
    public function testSetNationalId()
42
    {
43
        $address = new Address();
44
        $nationalId = 'A123456789B';
45
        $address->setNationalId($nationalId);
46
        $this->assertSame($nationalId, $address->getNationalId());
47
    }
48
}
49