Completed
Push — master ( 6b4d01...deddd6 )
by Daniel
03:16
created

ValueObjectTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
c 2
b 0
f 0
lcom 0
cbo 2
dl 0
loc 16
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testSameAs() 0 6 1
A testNotSameAs() 0 6 1
1
<?php
2
3
namespace  Application\Infrastructure\Test\Domain;
4
5
use Application\Tests\Domain\Fixtures\Address;
6
7
class ValueObjectTest extends \PHPUnit_Framework_TestCase
8
{
9
    public function testSameAs()
10
    {
11
        $address = new Address('Av. Bandeirantes', '330', '303315000');
12
        $other = new Address('Av. Bandeirantes', '330', '303315000');
13
        $this->assertTrue($address->sameAs($other));
14
    }
15
16
    public function testNotSameAs()
17
    {
18
        $address = new Address('Amphitheatre Parkway', '1600', '94043');
19
        $other = new Address('Av. Bandeirantes', '330', '303315000');
20
        $this->assertFalse($address->sameAs($other));
21
    }
22
}