VoteCreatedTest.php 616 Bytes
<?php

namespace FootyRoom\Tests\Unit\Vote;

use FootyRoom\Tests\TestCase;
use FootyRoom\Core\Vote\VoteCreated;
use FootyRoom\Core\Vote\Vote;
use FootyRoom\Core\Vote\Choice;

class VoteCreatedTest extends TestCase
{
    public function testConstructor()
    {
        $pollId = 'motm-1234';
        $choice = new Choice(1);
        $tracker = '1234abcde';
        $userId = 41301;

        $vote = new Vote(
            $pollId,
            $choice,
            $tracker,
            $userId
        );

        $voteCreated = new VoteCreated($vote);

        $this->assertEquals($vote, $voteCreated->vote);
    }
}