AddressFinderTest.php 739 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
<?php

namespace LQDN\Tests\Functional\Finder;

use LQDN\Tests\Functional\FunctionalTest;

class AddressFinderTest extends FunctionalTest
{
    public function testFindByUserId()
    {
11 12
        $addresse = $this->container['address_finder']->findByUserId(1);
        $this->assertCount(9, $addresse);
13

14
        // Check the address have an ID of 1
15
        $expectedAddress = [
16 17 18
            'id' => '1',
            'nom' => 'Main',
            'adresse' => '1 rue Ménars',
19
            'adresse2' => null,
20
            'codepostal' => '75001',
21 22 23 24 25
            'ville' => 'Paris',
            'etat' => null,
            'pays' => 'France',
            'user_id' => '1',
        ];
26
        $this->assertEquals($expectedAddress, $addresse);
27 28
    }
}