This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.  
 More...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. 
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Unit tests for assErrorTextTest
- Author
 - Maximilian Becker mbeck.nosp@m.er@d.nosp@m.ataba.nosp@m.y.de
 
\ 
Definition at line 26 of file assErrorTextTest.php.
 
◆ setUp()
  
  
      
        
          | assErrorTextTest::setUp  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
protected   | 
  
 
Definition at line 30 of file assErrorTextTest.php.
   32         chdir(__DIR__ . 
'/../../../../');
    36         $ilCtrl_mock = $this->createMock(
'ilCtrl');
    37         $ilCtrl_mock->expects($this->any())->method(
'saveParameter');
    38         $ilCtrl_mock->expects($this->any())->method(
'saveParameterByClass');
    39         $this->setGlobalVariable(
'ilCtrl', $ilCtrl_mock);
    41         $lng_mock = $this->createMock(
'ilLanguage', [
'txt'], [], 
'', 
false);
    43         $this->setGlobalVariable(
'lng', $lng_mock);
    45         $this->setGlobalVariable(
'ilias', $this->getIliasMock());
    46         $this->setGlobalVariable(
'ilDB', $this->getDatabaseMock());
  
 
 
◆ test_getErrorsFromText()
      
        
          | assErrorTextTest::test_getErrorsFromText  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 56 of file assErrorTextTest.php.
   58         $this->markTestSkipped(
'Generates warning for some unknown reason.');
    61         $instance->setPointsWrong(-2);
    64                         Eine Kündigung kommt durch zwei ((gleichlautende Willenserklärungen zustande)).    65                         Ein Vertrag kommt durch ((drei gleichlaute)) Willenserklärungen zustande.    66                         Ein Kaufvertrag an der Kasse im #Supermarkt kommt durch das legen von Ware auf das    67                         Kassierband und den Kassiervorgang zustande. Dies nennt man ((konsequentes Handeln.))';
    76         $instance->setErrorText($errortext);
    77         $instance->parseErrorText();
    78         $instance->setErrorsFromParsedErrorText();
    79         $actual = $instance->getErrorData();
    81         $this->assertEquals($expected, $actual);
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
Class for error text questions. 
 
 
 
 
◆ test_getErrorsFromText_noMatch()
      
        
          | assErrorTextTest::test_getErrorsFromText_noMatch  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 84 of file assErrorTextTest.php.
   86         $this->markTestSkipped(
'Generates warning for some unknown reason.');
    89         $instance->setPointsWrong(-2);
    92                         Eine Kündigung)) kommt durch zwei gleichlautende (Willenserklärungen) zustande.    93                         Ein Vertrag kommt durch (drei gleichlaute) Willenserklärungen zustande.    94                         Ein Kaufvertrag an der Kasse im Supermarkt [kommt] durch das legen von Ware auf das    95                         Kassierband und den [[Kassiervorgang]] zustande. Dies nennt man *konsequentes Handeln.';
    99         $instance->setErrorText($errortext);
   100         $instance->parseErrorText();
   101         $instance->setErrorsFromParsedErrorText();
   102         $actual = $instance->getErrorData();
   104         $this->assertEquals($expected, $actual);
 Class for error text questions. 
 
 
 
 
◆ test_instantiateObjectSimple()
      
        
          | assErrorTextTest::test_instantiateObjectSimple  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 49 of file assErrorTextTest.php.
   53         $this->assertInstanceOf(assErrorText::class, $instance);
 Class for error text questions. 
 
 
 
 
◆ test_removeErrorDataWithoutPosition()
      
        
          | assErrorTextTest::test_removeErrorDataWithoutPosition  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 145 of file assErrorTextTest.php.
  148         $instance->setPointsWrong(-2);
   150         $parsed_errortext = [
   152                 [
'text' => 
'1', 
'error_type' => 
'none'],
   154                     'text' => 
'gleichlautende',
   155                     'text_wrong' => 
'gleichlautende Willenserklärungen zustande.',
   156                     'error_type' => 
'passage_start',
   157                     'error_position' => 1,
   158                     'text_correct' => 
'',
   161                 [
'text' => 
'2', 
'error_type' => 
'none'],
   163                     'text' => 
'Supermarkt',
   164                     'text_wrong' => 
'Supermarkt',
   165                     'error_type' => 
'word',
   166                     'error_position' => 3,
   167                     'text_correct' => 
'',
   184         $instance->setParsedErrorText($parsed_errortext);
   185         $instance->setErrorData($errordata);
   186         $instance->removeErrorDataWithoutPosition();
   187         $actual = $instance->getErrorData();
   189         $this->assertEquals($expected, $actual);
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
Class for error text questions. 
 
 
 
 
◆ test_setErrordata()
      
        
          | assErrorTextTest::test_setErrordata  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 107 of file assErrorTextTest.php.
  110         $instance->setPointsWrong(-2);
   114         $instance->setErrorData($errordata);
   115         $actual = $instance->getErrorData();
   117         $this->assertEquals($expected, $actual);
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
Class for error text questions. 
 
 
 
 
◆ test_setErrordata_oldErrordataPresent()
      
        
          | assErrorTextTest::test_setErrordata_oldErrordataPresent  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 120 of file assErrorTextTest.php.
  123         $instance->setPointsWrong(-2);
   138         $instance->setErrorData($old_errordata);
   139         $instance->setErrorData($new_errordata);
   141         $actual = $instance->getErrorData();
   143         $this->assertEquals($new_errordata, $actual);
 This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
Class for error text questions. 
 
 
 
 
◆ $backupGlobals
  
  
      
        
          | assErrorTextTest::$backupGlobals = false | 
         
       
   | 
  
protected   | 
  
 
 
The documentation for this class was generated from the following file: