public function test_setErrordata_oldErrordataPresent() { // Arrange require_once './Modules/TestQuestionPool/classes/class.assErrorText.php'; $instance = new assErrorText(); $errordata = array('passages' => array(0 => 'drei Matrosen'), 'words' => array()); require_once "./Modules/TestQuestionPool/classes/class.assAnswerErrorText.php"; $expected = new assAnswerErrorText($errordata['passages'][0], '', 0); $instance->errordata = $expected; // Act $instance->setErrorData($errordata); $all_errors = $instance->getErrorData(); $actual = $all_errors[0]; // Assert $this->assertEquals($expected, $actual); }
public function test_setErrordata_oldErrordataPresent() { $this->markTestIncomplete('No good way to prepopulate errordata to make this test meaningful.'); return; // Arrange require_once './Modules/TestQuestionPool/classes/class.assErrorText.php'; $instance = new assErrorText(); $errordata = array('error1'); require_once "./Modules/TestQuestionPool/classes/class.assAnswerErrorText.php"; $expected = new assAnswerErrorText($errordata[0], 'correct1', 10.0); $instance->errordata = $expected; // Act $instance->setErrorData($errordata); $all_errors = $instance->getErrorData(); $actual = $all_errors[0]; // Assert $this->assertEquals($expected, $actual); }