MovedTest.php
671 Bytes
<?php
namespace FootyRoom\Tests\Unit\ForumPost;
use FootyRoom\Tests\TestCase;
use FootyRoom\Core\ForumPost\Moved;
use FootyRoom\Core\ForumPost\ForumPost;
class MovedTest extends TestCase
{
public function testConstructor()
{
$previousCategoryId = 60;
$title = 'title';
$newCategoryId = 61;
$userId = 41301;
$forumPost = new ForumPost(
$title,
$newCategoryId,
$userId
);
$moved = new Moved($forumPost, $previousCategoryId);
$this->assertEquals($forumPost, $moved->post);
$this->assertEquals($previousCategoryId, $moved->previousCategoryId);
}
}