ValueObjectTest::testSameAs()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 0
1
<?php
2
3
namespace  ApiBundle\Tests\Domain;
4
5
use ApiBundle\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
}