DonationFinderTest.php 1.18 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
<?php

namespace LQDN\Tests\Functional\Finder;

use LQDN\Tests\Functional\FunctionalTest;

class DonationFinderTest extends FunctionalTest
{
    public function testFindByUserId()
    {
        $donations = $this->container['donation_finder']->findByUserId(1);
        $this->assertCount(1, $donations);

        // Check the first donation
        $expectedDonation = [
            'id' => '1',
            'user_id' => '1',
            'status' => '1',
            'datec' => '2016-06-10 12:34:00',
            'somme' => '1000',
            'lang' => 'fr_FR',
            'cadeau' => '1',
            'abo' => '1',
            'taille' => '8',
            'public' => '0',
            'pdf' => 'pdf',
            'decimale' => '2',
            'datee' => '2016-06-10 12:34:00',
            'mailsent' => '1',
            'color' => 'blue',
            'pi_x' => '3',
            'pi_y' => '3',
            'hash' => 'hash',
            'taille_h' => '8',
            'fdnn_user' => '1234567890',
            'color_2' => 'red',
            'cumul' => '1000',
            'adresse_id' => '1',
            'identifier' => 'id1',
        ];
        $this->assertEquals($expectedDonation, $donations[1]);
    }
}