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.
26 lines
677 B
26 lines
677 B
<?php
|
|
|
|
namespace TestBusinessClass;
|
|
|
|
use BusinessClass\TextQuestion;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
class TextQuestionTest extends TestCase
|
|
{
|
|
public function testPrintStrategy()
|
|
{
|
|
$content = 'What is your name?';
|
|
$id = 1;
|
|
$textQuestion = new TextQuestion($id, $content);
|
|
$expectedOutput = "<div class='tab'>
|
|
<h6>$content</h6>
|
|
<p>
|
|
<input data-id='$id' placeholder='...' oninput='this.className = '''' type='text' name='answers[]'>
|
|
</p>
|
|
</div>\n";
|
|
$this->assertEquals($expectedOutput, $textQuestion->printStrategy());
|
|
}
|
|
}
|
|
|
|
|