VoteTest.php
771 Bytes
<?php
namespace FootyRoom\Tests\Unit\Vote;
use FootyRoom\Tests\TestCase;
use FootyRoom\Core\Vote\Vote;
use FootyRoom\Core\Vote\Choice;
class VoteTest extends TestCase
{
public function testConstructor()
{
$pollId = 'motm-1234';
$choice = new Choice(1);
$tracker = '1234abcde';
$userId = 41301;
$vote = new Vote(
$pollId,
$choice,
$tracker,
$userId
);
$this->assertEquals($pollId, $vote->getPollId());
$this->assertEquals($choice, $vote->getChoice());
$this->assertEquals($tracker, $vote->getTracker());
$this->assertEquals($userId, $vote->getUserId());
$this->assertInstanceOf(\DateTime::class, $vote->getDate());
}
}