You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
639 B
24 lines
639 B
<?php
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
use classes\Answer;
|
|
|
|
final class testAnswer extends TestCase
|
|
{
|
|
public function testInstanciation()
|
|
{
|
|
$answer = new Answer(1, "content", 1);
|
|
$this->assertInstanceOf(Answer::class, $answer);
|
|
$this->assertEquals(1, $answer->getId());
|
|
$this->assertEquals("content", $answer->getContent());
|
|
$this->assertEquals(1, $answer->getIdQuestion());
|
|
}
|
|
|
|
public function testSetContent()
|
|
{
|
|
$answer = new Answer(1, "content", 1);
|
|
$answer->setContent("new content");
|
|
$this->assertEquals("new content", $answer->getContent());
|
|
}
|
|
}
|