AzineContactSorterTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
wmc 1
eloc 8
c 2
b 0
f 1
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testCompare() 0 10 1
1
<?php
2
3
namespace Azine\HybridAuthBundle\Services;
4
5
use Azine\HybridAuthBundle\Entity\UserContact;
6
use Symfony\Bundle\FrameworkBundle\Tests\TestCase;
7
8
class AzineContactSorterTest extends TestCase
9
{
10
    public function testCompare()
11
    {
12
        $u1 = new UserContact('Xing', 'm', 'firstname', 'lasTname');
13
        $u2 = new UserContact('Xing', 'm', 'firstname2', 'lastname2');
14
        $u3 = new UserContact('Xing', 'm', 'firstname3', 'Lastname3');
15
16
        $sorter = new AzineContactSorter();
17
        $this->assertSame(0, $sorter->compare($u1, $u1));
18
        $this->assertSame(-1, $sorter->compare($u1, $u2));
19
        $this->assertSame(1, $sorter->compare($u3, $u2));
20
    }
21
}
22